Hi Sarthak,

14.03.2016 00:36, sarthak agarwal пишет:

On Sun, Mar 13, 2016 at 11:07 PM, Even Rouault <even.roua...@spatialys.com <mailto:even.roua...@spatialys.com>> wrote:

    On Sunday 13 March 2016 17:13:27 Dmitry Baryshnikov wrote:
    > Hi Sarthak,
    >
    > 1. The GDAL have 2 postgis drivers (raster and vector).

RIght now I am working on raster part, I still have to figure out which part of the code takes care of |vector| postgis driver.

Look at https://github.com/OSGeo/gdal/tree/trunk/gdal/ogr/ogrsf_frmts/pg

    > 2. You need to add some information to the doxygen comment of

    > GetConnectionInfo method about new functionality.

I made changes in the comments, I guess doxygen reads comments in between the lines of the code. If still I have to make some changes, please tell me.

I figure out that doxygen not parse this file (it seems to me because it is not public). But, I didn't see explain of PGUSER, PGDATABASEetc. Also it'll be more useful to extend brief in comment before function name (https://github.com/sarthak-0415/gdal/blob/1e7970bf38bc06c837ab76d4a185b59089df07f0/gdal/frmts/postgisraster/postgisrasterdataset.cpp#L2463-L2483) as it done, for example, for mode parameter.

    > 3. Do you look at psql behaviour? It seems to me the ticket
    author means
    > to get the database name not only from environment variable, but
    also
    > from the current logged user name.

    We should be as tolerant as the OGR PG driver is. ie not
    constraint the user
    to specify more than what PQconnectdb() requires  (ie it can be
    potentially
    empty)

I have made the changes to make |DBname| to |NULL| if we do not have any database name or username.

This is not expected behaviour. As Even wrote if no username nor dbname provided, the function should get user login and this will be username and DB name. Do you look at psql sources (this may be rather complex, and I'm ready to discuss the scope of this work)?


    > 4. There is a logic error: You form connection string based on
    > parameters (papszParams) here -
    >
    https://github.com/sarthak-0415/gdal/blob/trunk/gdal/frmts/postgisraster/pos
    > tgisrasterdataset.cpp#L2502 , but change the
    > papszParams below (i.e.
    >
    https://github.com/sarthak-0415/gdal/blob/trunk/gdal/frmts/postgisraster/pos
    > tgisrasterdataset.cpp#L2605). Also changed papszParams never
    used and only
    > freed here -
    >
    https://github.com/sarthak-0415/gdal/blob/trunk/gdal/frmts/postgisraster/pos
    > tgisrasterdataset.cpp#L2735.
    >

I fixed that logical error, and Now it reads the |username| twice (once to init the |dbname| and second for the |connection|) you can find those changes here <https://github.com/OSGeo/gdal/compare/trunk...sarthak-0415:trunk#diff-31df0e62d00ca09f9f11ad2f29e94b540> and travis <https://travis-ci.org/sarthak-0415/gdal/builds/115730596> for the builds.

Yes, I see. What about your preferable idea for GSoC? What you ideas about it developing?
By the way, today the  Student Application Period started.

Regards,

Sarthak

    >
    > Best regards,
    >      Dmitry
    >
    > 13.03.2016 00:10, sarthak agarwal пишет:
    > > Thank you for your reply Dmitry,
    > >
    > > Yesterday I was working on ticket 6294
    > > <https://trac.osgeo.org/gdal/ticket/6294> but since you said
    it was
    > > controversial I started to look around at ticket 6316
    > > <https://trac.osgeo.org/gdal/ticket/6316>,
    > >
    > > I figured out that we have to add a |else| statement after
    this code
    > >
    <https://github.com/sarthak-0415/gdal/blob/trunk/gdal/frmts/postgisraster/
    > > postgisrasterdataset.cpp> to give a default value to the
    |ppszDbname| in
    > > case user dosen’t
    > > provide any database name by default.
    > >
    > > And I suggest this small enhancement
    > >
    <https://github.com/OSGeo/gdal/commit/e7b2e9e9cd946d257cae5dfd196b4786cc2c
    > > 0e94> to the code.
    > > Although I am not sure of this line
    > >
    <https://github.com/sarthak-0415/gdal/blob/trunk/gdal/frmts/postgisraster/
    > > postgisrasterdataset.cpp#L2642> where I want to copy the
    |userName| into
    > > |dbName|.
    > >
    > > This is a small fix and I wanted to discuss further on it.
    > >
    > > I have succesfully build the code on travis
    > > <https://travis-ci.org/sarthak-0415/gdal/builds/115574203>, please
    > > check it once.
    > >
    > > I have some doubts regarding some variables and functions for
    which I
    > > am still reading the code.
    > > I will get back to you if I have some more doubts.
    > >
    > > Regards,
    > > Sarthak
    > >
    > > On Sat, Mar 12, 2016 at 10:42 PM, Dmitry Baryshnikov
    > >
    > > <bishop....@gmail.com <mailto:bishop....@gmail.com>
    <mailto:bishop....@gmail.com <mailto:bishop....@gmail.com>>> wrote:
    > >     Hello GSoC students!
    > >
    > >     Many of you wrote to different lists and directly for me.
    I tried
    > >     to systematize your questions.
    > >
    > >     1. First of all each student need to subscribe to
    > > s...@lists.osgeo.org <mailto:s...@lists.osgeo.org>
    <mailto:s...@lists.osgeo.org <mailto:s...@lists.osgeo.org>> (the themes
    > >     connected with organizing moments) and gdal-dev@lists.osgeo.org
    <mailto:gdal-dev@lists.osgeo.org>
    > >     <mailto:gdal-dev@lists.osgeo.org
    <mailto:gdal-dev@lists.osgeo.org>> (the themes about ideas,
    > >     tickets, coding and community). Please don't flood both
    lists the
    > >     same letters.
    > >
    > >     2. Next - I dig the GDAL tracker and found some tickets
    worth to
    > >     be fixed. This work help you to understand the project
    structure
    > >     and how it works (building, testing and so on) and help
    project to
    > >     became better.
    > >     The expected result is applied pool request in GDAL main
    > >     repository at github (https://github.com/OSGeo/gdal).
    > >     By the way, after pool request to this repository, the
    provided
    > >     fixes are tested via TravisC and over test utilities.
    > >     Before making pool request please test it yourself (ubuntu and
    > >     windows is enough, virtualbox or preferable virtualization
    soft
    > >     may help here).
    > >     Here is the tickets I think is good for you (it's welcome if
    > >     community fix this list - maybe some tickets need to be
    excluded
    > >     or some included):
    > >
    > >     - https://trac.osgeo.org/gdal/ticket/2773
    > >     - https://trac.osgeo.org/gdal/ticket/5035 - Alex
    > >     - https://trac.osgeo.org/gdal/ticket/5347
    > >     - https://trac.osgeo.org/gdal/ticket/5592
    > >     - https://trac.osgeo.org/gdal/ticket/5681
    > >     - https://trac.osgeo.org/gdal/ticket/5705
    > >     - https://trac.osgeo.org/gdal/ticket/6185 - Tanuj
    > >     - https://trac.osgeo.org/gdal/ticket/6222
    > >     - https://trac.osgeo.org/gdal/ticket/6246
    > >     - https://trac.osgeo.org/gdal/ticket/6304
    > >     - https://trac.osgeo.org/gdal/ticket/6316
    > >     - https://trac.osgeo.org/gdal/ticket/6385
    > >
    > >     I checked tickets already get by students. It's good to
    discuss
    > >     with community how you plan to fix the tickets before start
    > >     coding. Also, choose tickets carefully, we need students
    with good
    > >     skills, so the ticket should show your potential. Some of you
    > >     already choose another tickets, and this is normal too,
    but they
    > >     need to be discussed too. For example the ticket
    > > https://trac.osgeo.org/gdal/ticket/6294 is rather controversial.
    > >
    > >     3. We need to see which ideas each of student choose, and
    what is
    > >     a plan how to release them. You need some discussion with the
    > >     community what is best way or some directions to do it.
    This is
    > >     not spoil of the time as your ideas come as background for
    your
    > >     project announces.
    > >
    > >     It'll be nice have more details for some ideas from list
    > > https://trac.osgeo.org/gdal/wiki/SummerOfCode. The ideas #7,8,9
    > >     are very briefly.
    > >
    > > ​

    --
    Spatialys - Geospatial professional services
    http://www.spatialys.com

Best regards,
    Dmitry

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to