This document provides an overview and instructions for PostGIS, an open source spatial database extender for PostgreSQL object-relational database. It discusses that PostGIS was developed by Refractions Research Inc to support GIS functionality and is now maintained by OSGeo. It also provides information on installing PostGIS, frequently asked questions, using PostGIS for data management and queries, raster data, and building applications using PostGIS geometry with MapServer.
2. Introduction
• PostGIS was developed by Refractions Research Inc, as a spatial
database technology research project. Refractions is a GIS and
database consulting company in Victoria, British Columbia, Canada,
specializing in data integration and custom software development.
We plan on supporting and developing PostGIS to support a range of
important GIS functionality, including full OpenGIS support, advanced
topological constructs (coverages, surfaces, networks), desktop user
interface tools for viewing and editing GIS data, and web-based
access tools. PostGIS is an incubation project of the OSGeo
Foundation. PostGIS is being continually improved and funded by
many FOSS4G Developers as well as corporations all over the world
that gain great benefit from its functionality and versatility
3. Project Steering Committee
• The PostGIS Project Steering Committee (PSC) coordinates the general
direction, release cycles, documentation, and outreach efforts for the
PostGIS project. In addition the PSC provides general user support,
accepts and approves patches from the general PostGIS community
and votes on miscellaneous issues involving PostGIS such as
developer commit access, new PSC members or significant API
changes.
4. PostGIS Installation
• Short Version
• tar xvfz postgis-2.1.10dev.tar.gz && cd postgis-2.1.10dev &&
./configure && make && make install
5. PostGIS Frequently Asked Questions
• Where can I find tutorials, guides and workshops on working with
PostGIS
• My applications and desktop tools worked with PostGIS 1.5,but they
don’t work with PostGIS 2.0. How do I fix this?
• When I load OpenStreetMap data with osm2pgsql, I’m getting an
error failed: ERROR: operator class "gist_geometry_ops" does not
exist for access method "gist" Error occurred. This worked fine in
PostGIS 1.5.
6. Using PostGIS: Data Management and
Queries
• GIS Objects
• The GIS objects supported by PostGIS are all the vector types defined in the
"Simple Features for SQL 1.2.1" standard defined by the OpenGIS Consortium
(OGC), and the ISO "SQL/MM Part 3: Spatial" document. In addition, PostGIS
supports a raster type (no standards exist to follow), and a topology model
(following an early draft ISO standard for topology that has not been
published as yet). The OGC and ISO standards define 2D (x/y), 3D (x/y/z,
x/y/m) and 4D (x/y/z/m) variants of points, lines, polygons, curved features,
polyhedra, and TINS.
7. Raster Data Management, Queries, and
Applications
• Using raster2pgsql to load rasters
• The raster2pgsql is a raster loader executable that loads GDAL supported
raster formats into sql suitable for loading into a PostGIS raster table. It is
capable of loading folders of raster files as well as creating overviews of
rasters. Since the raster2pgsql is compiled as part of PostGIS most often
(unless you compile your own GDAL library), the raster types supported by
the executable will be the same as those compiled in the GDAL dependency
library. To get a list of raster types your particular raster2pgsql supports use
the -G switch. These should be the same as those provided by your PostGIS
install documented here ST_GDALDrivers if you are using the same gdal
library for both.
8. Using PostGIS Geometry: Building
Applications
• Using MapServer
• The Minnesota MapServer is an internet web-mapping server which conforms
to the OpenGIS Web Mapping Server specification.
• The MapServer homepage is at http://mapserver.org.
• The OpenGIS Web Map Specification is at
http://www.opengeospatial.org/standards/wms.