F.34. PostGIS — spatial and geographic objects
The postgis module provides support for geographic objects, allowing location queries to be run in SQL. PostGIS adds support for geographic objects to ProtonBase, enabling spatial queries including spatial relationships, spatial measurements, and geometric operations.
When postgis is active, it provides spatial data types (geometry and geography), spatial functions, and spatial operators. To use PostGIS, you need to register the extension in your database:
CREATE EXTENSION postgis;Supported Features
ProtonBase supports the following PostGIS features:
- Spatial Data Types:
geometryandgeographytypes - Geometry Constructors: Functions to create geometry objects from various formats (WKT, WKB, GeoJSON, etc.)
- Spatial Relationships: Functions for testing spatial relationships (ST_Contains, ST_Intersects, ST_Within, etc.)
- Spatial Measurements: Functions for calculating distances, areas, lengths, etc.
- Spatial Reference Systems (SRID): Support for coordinate reference systems
Limitations
The following PostGIS features are not currently supported:
- Spatial Indexes: PostGIS spatial indexes (GIST indexes on geometry/geography columns) are not supported
- Raster Data: Raster data types and functions are not supported
- Topology: Topology extension and related functions are not supported
- Advanced Extensions: Advanced PostGIS extensions beyond basic geometry operations
Reference Documentation
For detailed PostGIS documentation, see:
- PostGIS Overview (opens in a new tab) - PostGIS 3.4 manual
- PostGIS Data Types (opens in a new tab) - Geometry and geography types
- Spatial Reference Systems (opens in a new tab) - SRID support
- Geometry Constructors (opens in a new tab) - Creating geometry objects
- Spatial Relationships & Measurements (opens in a new tab) - Spatial functions
For usage examples and guides, see PostGIS Geographic Information Retrieval.