wiki:Grass7/VectorLib/PostGISInterface

Version 18 (modified by martinl, 12 years ago) ( diff )

--

PostGIS data provider in GRASS 7

PostGIS data can be accessed in GRASS 7 using GRASS-OGR data provider or preferably by native GRASS-PostGIS data provider. Note that GRASS-OGR data provider supports only simple feature access.

Development of PostGIS data provider has been supported by Fondazione Edmund Mach and Comune di Trento (Italy).

This data provider allows GRASS to read (see read_pg.c) and write (see write_pg.c) PostGIS data directly without any external library (like in the case of GRASS-OGR data provider). GRASS-PostGIS data provider is implemented using libpq library.

Note that GRASS-PostGIS data provider is compiled only when GRASS is configured with --with-postgres switch.

Overview of subroutines to read PostGIS data:

LevelSequantial accessRandom access
1 (without topology)V1_read_next_line_pg()V1_read_line_pg()
2 (with pseudo-topology/topology)V2_read_next_line_pg()V2_read_line_pg()

Overview of subroutines to write PostGIS data:

LevelWrite new featureDelete existing featureRewrite existing feature
1 (without topology)V1_write_line_pg()V1_rewrite_line_pg()V1_delete_line_pg()
2 (with pseudo-topology - simple feature access)V2_write_line_sfa()V2_rewrite_line_sfa()V2_delete_line_sfa()
2 (with topology - PostGIS Topology)V2_write_line_pg()

Simple features access

GRASS-PostGIS provider allows to read PostGIS data stored as simple features on level 1 (without topology) and on level 2 (with pseudo-topology).

Topological access

For more information see PostGIS Topology page.supports

Note: See TracWiki for help on using the wiki.