PostGIS Topology

From GRASS-Wiki
Jump to navigation Jump to search

PostGIS Topology allows to store topological vector data in PostGIS database. It's available in PostGIS 2.0 and greater. GRASS supports PostGIS Topology in version GRASS 7.0 and greater through GRASS-PostGIS data provider.

Background

Topological models used by GRASS and PostGIS Topology are different - see bellow.

GRASS Topology Model

In GRASS model are defined various topological elements:

  • nodes - point elements
    For each node is defined which lines/boundaries starts and ends in this node.
  • lines - linear elements which are not forming areas
    For each line is defined by start and end node.
  • boundaries - linear elements which can form areas
    For each line is defined by start and end node, and by the area on the left and right.
  • centroids - point located inside area
    For each centroid is defined area id within the centroid is located.
  • areas - topologically correct areal elements formed by closed set of boundaries and one centroid located inside the area
    For each area is defined list of boundaries which forms the area (outter ring), number of isles and id of isles located in the area
  • isle - inner ring (closed set of boundaries) located inside area (note that inner ring is not allowed to touch the area boundary)
    For each isle is defined list of boundaries which forms the isle (it's outter ring) and area id where the isle is located.

For other info and examples see programmer's manual.

PostGIS Topology Model

PostGIS Topology model is based on ISO standard 13249. The model defines only three topological elements:

  • nodes - point elements
  • edges - linear elements
  • faces - area elements

See also

External links