PostGIS 2.1.6dev Manual

SVN Revision (13161)

The PostGIS Development Group

Abstract

PostGIS is an extension to the PostgreSQL object-relational database system which allows GIS (Geographic Information Systems) objects to be stored in the database. PostGIS includes support for GiST-based R-Tree spatial indexes, and functions for analysis and processing of GIS objects.

This is the manual for version 2.1.6dev

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License. Feel free to use this material any way you like, but we ask that you attribute credit to the PostGIS Project and wherever possible, a link back to http://postgis.net.


Table of Contents

1. Introduction
1.1. Project Steering Committee
1.2. Core Contributors Present
1.3. Core Contributors Past
1.4. Other Contributors
1.5. More Information
2. PostGIS Installation
2.1. Short Version
2.2. Install Requirements
2.3. Getting the Source
2.4. Compiling and Install from Source: Detailed
2.4.1. Configuration
2.4.2. Building
2.4.3. Building PostGIS Extensions and Deploying them
2.4.4. Testing
2.4.5. Installation
2.5. Create a spatially-enabled database on PostgreSQL lower than 9.1
2.6. Creating a spatial database using EXTENSIONS
2.7. Installing, Upgrading Tiger Geocoder and loading data
2.7.1. Tiger Geocoder Enabling your PostGIS database: Using Extension
2.7.2. Tiger Geocoder Enabling your PostGIS database: Not Using Extensions
2.7.3. Loading Tiger Data
2.7.4. Upgrading your Tiger Geocoder Install
2.8. Create a spatially-enabled database from a template
2.9. Upgrading
2.9.1. Soft upgrade
2.9.2. Hard upgrade
2.10. Common Problems during installation
2.11. JDBC
2.12. Loader/Dumper
3. PostGIS Frequently Asked Questions
4. Using PostGIS: Data Management and Queries
4.1. GIS Objects
4.1.1. Well-Known Binary (WKB) and Well-Known Text (WKT) Representations
4.1.2. PostGIS EWKB, EWKT and Canonical Forms
4.1.3. SQL-MM Part 3
4.2. PostGIS Geography Type
4.2.1. Geography Basics
4.2.2. When to use Geography Data type over Geometry data type
4.2.3. Geography Advanced FAQ
4.3. Using OpenGIS Standards
4.3.1. The SPATIAL_REF_SYS Table and Spatial Reference Systems
4.3.2. The GEOMETRY_COLUMNS VIEW
4.3.3. Creating a Spatial Table
4.3.4. Manually Registering Geometry Columns in geometry_columns
4.3.5. Ensuring OpenGIS compliancy of geometries
4.3.6. Dimensionally Extended 9 Intersection Model (DE-9IM)
4.4. Loading GIS (Vector) Data
4.4.1. Loading Data Using SQL
4.4.2. shp2pgsql: Using the ESRI Shapefile Loader
4.5. Retrieving GIS Data
4.5.1. Using SQL to Retrieve Data
4.5.2. Using the Dumper
4.6. Building Indexes
4.6.1. GiST Indexes
4.6.2. Using Indexes
4.7. Complex Queries
4.7.1. Taking Advantage of Indexes
4.7.2. Examples of Spatial SQL
5. Raster Data Management, Queries, and Applications
5.1. Loading and Creating Rasters
5.1.1. Using raster2pgsql to load rasters
5.1.2. Creating rasters using PostGIS raster functions
5.2. Raster Catalogs
5.2.1. Raster Columns Catalog
5.2.2. Raster Overviews
5.3. Building Custom Applications with PostGIS Raster
5.3.1. PHP Example Outputting using ST_AsPNG in concert with other raster functions
5.3.2. ASP.NET C# Example Outputting using ST_AsPNG in concert with other raster functions
5.3.3. Java console app that outputs raster query as Image file
5.3.4. Use PLPython to dump out images via SQL
5.3.5. Outputting Rasters with PSQL
6. Using PostGIS Geometry: Building Applications
6.1. Using MapServer
6.1.1. Basic Usage
6.1.2. Frequently Asked Questions
6.1.3. Advanced Usage
6.1.4. Examples
6.2. Java Clients (JDBC)
6.3. C Clients (libpq)
6.3.1. Text Cursors
6.3.2. Binary Cursors
7. Performance tips
7.1. Small tables of large geometries
7.1.1. Problem description
7.1.2. Workarounds
7.2. CLUSTERing on geometry indices
7.3. Avoiding dimension conversion
7.4. Tuning your configuration
7.4.1. Startup
7.4.2. Runtime
8. PostGIS Reference
8.1. PostgreSQL PostGIS Geometry/Geography/Box Types
8.2. Management Functions
8.3. Geometry Constructors
8.4. Geometry Accessors
8.5. Geometry Editors
8.6. Geometry Outputs
8.7. Operators
8.8. Spatial Relationships and Measurements
8.9. SFCGAL Functions
8.10. Geometry Processing
8.11. Linear Referencing
8.12. Long Transactions Support
8.13. Miscellaneous Functions
8.14. Exceptional Functions
9. Raster Reference
9.1. Raster Support Data types
9.2. Raster Management
9.3. Raster Constructors
9.4. Raster Accessors
9.5. Raster Band Accessors
9.6. Raster Pixel Accessors and Setters
9.7. Raster Editors
9.8. Raster Band Editors
9.9. Raster Band Statistics and Analytics
9.10. Raster Outputs
9.11. Raster Processing
9.11.1. Map Algebra
9.11.2. Built-in Map Algebra Callback Functions
9.11.3. DEM (Elevation)
9.11.4. Raster to Geometry
9.12. Raster Operators
9.13. Raster and Raster Band Spatial Relationships
10. PostGIS Raster Frequently Asked Questions
11. Topology
11.1. Topology Types
11.2. Topology Domains
11.3. Topology and TopoGeometry Management
11.4. Topology Constructors
11.5. Topology Editors
11.6. Topology Accessors
11.7. Topology Processing
11.8. TopoGeometry Constructors
11.9. TopoGeometry Editors
11.10. TopoGeometry Accessors
11.11. TopoGeometry Outputs
11.12. Topology Spatial Relationships
12. PostGIS Extras
12.1. Tiger Geocoder
13. PostGIS Special Functions Index
13.1. PostGIS Aggregate Functions
13.2. PostGIS SQL-MM Compliant Functions
13.3. PostGIS Geography Support Functions
13.4. PostGIS Raster Support Functions
13.5. PostGIS Geometry / Geography / Raster Dump Functions
13.6. PostGIS Box Functions
13.7. PostGIS Functions that support 3D
13.8. PostGIS Curved Geometry Support Functions
13.9. PostGIS Polyhedral Surface Support Functions
13.10. PostGIS Function Support Matrix
13.11. New, Enhanced or changed PostGIS Functions
13.11.1. PostGIS Functions new or enhanced in 2.1
13.11.2. PostGIS functions breaking changes in 2.1
13.11.3. PostGIS Functions new, behavior changed, or enhanced in 2.0
13.11.4. PostGIS Functions changed behavior in 2.0
13.11.5. PostGIS Functions new, behavior changed, or enhanced in 1.5
13.11.6. PostGIS Functions new, behavior changed, or enhanced in 1.4
13.11.7. PostGIS Functions new in 1.3
14. Reporting Problems
14.1. Reporting Software Bugs
14.2. Reporting Documentation Issues
A. Appendix
A.1. Release 2.1.5
A.2. Release 2.1.4
A.3. Release 2.1.3
A.4. Release 2.1.2
A.5. Release 2.1.1
A.6. Release 2.1.0
A.7. Release 2.0.5
A.8. Release 2.0.4
A.9. Release 2.0.3
A.10. Release 2.0.2
A.11. Release 2.0.1
A.12. Release 2.0.0
A.13. Release 1.5.4
A.14. Release 1.5.3
A.15. Release 1.5.2
A.16. Release 1.5.1
A.17. Release 1.5.0
A.18. Release 1.4.0
A.19. Release 1.3.6
A.20. Release 1.3.5
A.21. Release 1.3.4
A.22. Release 1.3.3
A.23. Release 1.3.2
A.24. Release 1.3.1
A.25. Release 1.3.0
A.26. Release 1.2.1
A.27. Release 1.2.0
A.28. Release 1.1.6
A.29. Release 1.1.5
A.30. Release 1.1.4
A.31. Release 1.1.3
A.32. Release 1.1.2
A.33. Release 1.1.1
A.34. Release 1.1.0
A.35. Release 1.0.6
A.36. Release 1.0.5
A.37. Release 1.0.4
A.38. Release 1.0.3
A.39. Release 1.0.2
A.40. Release 1.0.1
A.41. Release 1.0.0
A.42. Release 1.0.0RC6
A.43. Release 1.0.0RC5
A.44. Release 1.0.0RC4
A.45. Release 1.0.0RC3
A.46. Release 1.0.0RC2
A.47. Release 1.0.0RC1