navigation

PostGIS 2.3.8 Manual

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.3.8

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. Creating a spatial database using EXTENSIONS
2.6. Create a spatially-enabled database without using extensions
2.7. Installing and Using the address standardizer
2.7.1. Installing Regex::Assemble
2.8. Installing, Upgrading Tiger Geocoder and loading data
2.8.1. Tiger Geocoder Enabling your PostGIS database: Using Extension
2.8.2. Tiger Geocoder Enabling your PostGIS database: Not Using Extensions
2.8.3. Using Address Standardizer Extension with Tiger geocoder
2.8.4. Loading Tiger Data
2.8.5. Upgrading your Tiger Geocoder Install
2.9. Create a spatially-enabled database from a template
2.10. Upgrading
2.10.1. Soft upgrade
2.10.2. Hard upgrade
2.11. Common Problems during installation
2.12. Loader/Dumper
3. PostGIS Frequently Asked Questions
4. Using PostGIS: Data Management and Queries
4.1. GIS Objects
4.1.1. OpenGIS WKB and WKT
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. BRIN Indexes
4.6.3. 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. PostGIS Grand Unified Custom Variables (GUCs)
8.3. Management Functions
8.4. Geometry Constructors
8.5. Geometry Accessors
8.6. Geometry Editors
8.7. Geometry Outputs
8.8. Operators
8.9. Spatial Relationships and Measurements
8.10. SFCGAL Functions
8.11. Geometry Processing
8.12. Linear Referencing
8.13. Temporal Support
8.14. Long Transactions Support
8.15. Miscellaneous Functions
8.16. 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. Address Standardizer
12.1. How the Parser Works
12.2. Address Standardizer Types
12.3. Address Standardizer Tables
12.4. Address Standardizer Functions
13. PostGIS Extras
13.1. Tiger Geocoder
14. PostGIS Special Functions Index
14.1. PostGIS Aggregate Functions
14.2. PostGIS Window Functions
14.3. PostGIS SQL-MM Compliant Functions
14.4. PostGIS Geography Support Functions
14.5. PostGIS Raster Support Functions
14.6. PostGIS Geometry / Geography / Raster Dump Functions
14.7. PostGIS Box Functions
14.8. PostGIS Functions that support 3D
14.9. PostGIS Curved Geometry Support Functions
14.10. PostGIS Polyhedral Surface Support Functions
14.11. PostGIS Function Support Matrix
14.12. New, Enhanced or changed PostGIS Functions
14.12.1. PostGIS Functions new or enhanced in 2.3
14.12.2. PostGIS Functions new or enhanced in 2.2
14.12.3. PostGIS functions breaking changes in 2.2
14.12.4. PostGIS Functions new or enhanced in 2.1
14.12.5. PostGIS functions breaking changes in 2.1
14.12.6. PostGIS Functions new, behavior changed, or enhanced in 2.0
14.12.7. PostGIS Functions changed behavior in 2.0
14.12.8. PostGIS Functions new, behavior changed, or enhanced in 1.5
14.12.9. PostGIS Functions new, behavior changed, or enhanced in 1.4
14.12.10. PostGIS Functions new in 1.3
15. Reporting Problems
15.1. Reporting Software Bugs
15.2. Reporting Documentation Issues
A. Appendix
A.1. Release 2.3.8
A.2. Release 2.3.7
A.3. Release 2.3.6
A.4. Release 2.3.5
A.5. Release 2.3.4
A.6. Release 2.3.3
A.7. Release 2.3.2
A.8. Release 2.3.1
A.9. Release 2.3.0
A.10. Release 2.2.2
A.11. Release 2.2.1
A.12. Release 2.2.0
A.13. Release 2.1.8
A.14. Release 2.1.7
A.15. Release 2.1.6
A.16. Release 2.1.5
A.17. Release 2.1.4
A.18. Release 2.1.3
A.19. Release 2.1.2
A.20. Release 2.1.1
A.21. Release 2.1.0
A.22. Release 2.0.5
A.23. Release 2.0.4
A.24. Release 2.0.3
A.25. Release 2.0.2
A.26. Release 2.0.1
A.27. Release 2.0.0
A.28. Release 1.5.4
A.29. Release 1.5.3
A.30. Release 1.5.2
A.31. Release 1.5.1
A.32. Release 1.5.0
A.33. Release 1.4.0
A.34. Release 1.3.6
A.35. Release 1.3.5
A.36. Release 1.3.4
A.37. Release 1.3.3
A.38. Release 1.3.2
A.39. Release 1.3.1
A.40. Release 1.3.0
A.41. Release 1.2.1
A.42. Release 1.2.0
A.43. Release 1.1.6
A.44. Release 1.1.5
A.45. Release 1.1.4
A.46. Release 1.1.3
A.47. Release 1.1.2
A.48. Release 1.1.1
A.49. Release 1.1.0
A.50. Release 1.0.6
A.51. Release 1.0.5
A.52. Release 1.0.4
A.53. Release 1.0.3
A.54. Release 1.0.2
A.55. Release 1.0.1
A.56. Release 1.0.0
A.57. Release 1.0.0RC6
A.58. Release 1.0.0RC5
A.59. Release 1.0.0RC4
A.60. Release 1.0.0RC3
A.61. Release 1.0.0RC2
A.62. Release 1.0.0RC1