[GRASS-dev] PostGIS manager for GRASS GIS
mohit.kumarug08 at students.iiit.ac.in
Tue Apr 3 16:26:17 EDT 2012
Sorry couldn't reply earlier as I was stuck with some college work.
On Mon, 2 Apr 2012 21:00:51 +0200, Martin Landa wrote:
> 2012/4/2 Mohit Kumar <mohit.kumarug08 at students.iiit.ac.in>:
>>>> I am interested in making a PostGIS manager in GRASS as a GSoc
>>>> 2012 task.
>>>> PyGreSQL is a python module that allows easy use of database
>>>> from a pyhton script. So it will be like a wrapper over
>>>> the database. This can be done using wxPython and will be OS
>>>> Sorry to bug you all, but I am very much interested in developing
>>> there is new development ongoing for this in GRASS 7, perhaps a
>>> moment to integrate a manager. Maybe Martin has some insights for
>>> us over the next days.
>> Its good to know that development is ongoing for this in GRASS, I
>> want to work on this as my GSoc task.
> the current PostGIS-related development in G7 is not much related to
> this idea. The vector engine in G7 is currently able to read PostGIS
> geometry data natively without any abstract level (like
> driver). Also write support has been recently implemented. The
> implementation is focused on simple feature access, GRASS builds a
> pseudo-like topology as for OGR links (see v.external). At this
> I am working on PostGIS topology support in GRASS.
>> I have made a brief idea for the manager. The following are the
>> modules of the manager
>> 1. Setup connection : This module will set up the connection with
>> the remote
>> database. It will take the input parameters from user and pass them
>> to a
>> connection string. After the connection has been established, the
>> user will
>> be shown the various tables(maps) that are stored and other
>> about the database and the connection
> This is already available in wxGUI . Of course there is always a
> space for any kind of improvements. But basically it's already there,
> to add widgets for entering username and password is quite easy task.
>> 2. View and edit data : This will display the data of the table in a
>> frame. One can view the map and modify the table values or the
> Also possible in current wxGUI . You just create a link using
> `v.external` and display the map in the map canvas as normal GRASS
> vector map. Also direct OGR access  is possible (no links,
> pseudo-topology built on the fly)
>> 3. Import to GRASS Data : This gives the user an option to save the
>> data in
>> Grass format for further processing/analysis of the data. This also
>> user an option to discard the data which is of no use.
> Possible with `v.in.ogr`. Simple wrapper based `v.in.ogr` for
> importing PostGIS is already there .
>> 4. Execute PostGis functions (geometry processing)on database and
>> output in grass data format.
> This could be improvement.
>> 5. SQL interface : This provides the advanced user to modify the
>> database by
>> use of direct SQL commands on the database.
>> 6. Export GRASS data to PostGIS data : Convert the Grass Data to SQL
>> database. First convert the Grass data to Esri Shapefile(.shp) using
>> OGR and
>> then converting that data to SQL database (shape2sql).
> Why?? You can export data directly using `v.out.ogr` . No need for
> Shapefiles, that's bad idea.
>> 7. Projection support : I was also thinking of adding projection
>> support to
>> the manager.
> In which sense, do you mean on-the fly re-projection (ST_transform)?
>  http://grass.osgeo.org/wiki/PostGIS#Import_into_GRASS
>  http://grass.osgeo.org/wiki/PostGIS#Export_to_PostGIS
Thanks for your feedback.
I know that various modules are possible in GRASS wxGUI. I want to
integrate them all and provide a direct interface for them. Regarding
data Export I was thinking about 'v.out.ogr' only.
And I was talking about on-the fly re-projection. The projection tables
can be stored in which ever way the user wants.
What more would you like to add to the current idea to make it worth
for a GSOC proposal?
Looking forward to your support.
Mohit Kumar (mohitkharb on irc)
Lab For Spatial Informatics
International Institute of Information and Technology
More information about the grass-dev