Chapter 4. Using PostGIS

Table of Contents
GIS Objects
Creating a Table with Geometry
Loading GIS Data
Retrieving GIS Data
Building Indexes
Java Clients (JDBC)
C Clients (libpq)

GIS Objects

The GIS objects supported by PostGIS are the "Simple Features" defined by the OpenGIS Consortium (OGC). Note that PostGIS currently support the features and the representation APIs, but the various comparison and convolution operators given in the OGC "Simple Features for SQL" specification.

Examples of the text representations of the features are as follows:

Note that in the examples above there are features with both 2-dimensional and 3-dimensional coordinates. PostGIS supports both 2d and 3d coordinates -- if you describe a feature with 2D coordinates when you insert it, the database will return that feature to you with 2D coordinates when you extract it. See the sections on the 2d() and 3d() functions for information on converting features to a particular coordinate dimension representation.