Kapitel 1. Einführung

Inhaltsverzeichnis

1.1. What Is PostGIS?

PostGIS extends PostgreSQL so that geospatial data can be stored, indexed, queried, and processed in the database. It keeps location data beside ordinary relational data, so a spatial query can use the same SQL, transactions, constraints, access controls, backup tools, and application connections as the rest of a PostgreSQL database.

The main postgis extension adds:

  • geometry for planar coordinate systems and geography for geodetic coordinates on the earth.

  • Spatial indexes that let the PostgreSQL planner avoid scanning every row when objects can be filtered by location.

  • Functions for measurement, relationships, overlays, geometry construction and editing, coordinate transformation, clustering, and spatial data exchange.

  • Support for common geospatial encodings and formats, including WKT, WKB, GeoJSON, GML, KML, FlatGeobuf, Geobuf, and Mapbox Vector Tiles.

This makes PostgreSQL a spatial database: applications can ask both ordinary questions and location-aware questions without moving data to a separate GIS processing system. Desktop GIS, map servers, ETL tools, and application frameworks can connect through normal PostgreSQL interfaces.

1.2. What Is in the PostGIS Distribution?

This manual documents the main PostGIS source distribution. Depending on how PostGIS was built and packaged, it can provide several PostgreSQL extensions and command-line tools:

postgis

The core geometry and geography types, spatial indexes, and most spatial functions.

postgis_raster

Raster storage, analysis, loading, and export. Raster support uses GDAL and can be omitted from a build.

postgis_topology

SQL/MM topology types and functions for models based on shared nodes, edges, and faces.

postgis_sfcgal

Additional 2D and 3D processing functions backed by the optional SFCGAL library.

Loaders and utilities

shp2pgsql, pgsql2shp, and raster2pgsql move data between common file formats and PostGIS. Other utilities support upgrades, profiling, and development.

The source tree also contains internal libraries such as liblwgeom and libpgcommon. They are implementation layers shared by PostGIS components, not separately released PostgreSQL extensions. Most users start by enabling the core extension with CREATE EXTENSION postgis; see Kapitel 2, PostGIS Installation for available components and build options.

1.3. The PostGIS Project Family

This manual covers the main postgis/postgis distribution. The official PostGIS source organization also hosts or mirrors complementary projects. These projects have their own release cycles, installation instructions, and documentation; installing the core extension does not install them.

  • Address Standardizer parses and normalizes postal addresses. It moved from the main PostGIS source tree to a separate repository for the PostGIS 3.7 development cycle.

  • PostGIS TIGER Geocoder provides United States address geocoding and reverse geocoding using Census TIGER data. It is also maintained separately from the main distribution.

  • H3-pg provides PostgreSQL bindings for the H3 hierarchical hexagonal indexing system and interoperates with PostGIS.

  • PostGIS Java provides Java bindings for PostGIS types.

  • Introduction to PostGIS is the hands-on workshop maintained by the PostGIS project.

Other PostgreSQL spatial extensions can complement PostGIS while remaining independent projects. For example, pgRouting adds routing and graph analysis. Use each project's own manual for its functions and support policy.

1.4. How to Use This Manual

The manual is both a guide to the PostGIS data model and the complete reference for the SQL interface. Choose a starting point based on what you are trying to do:

If you are new to spatial SQL

Start with the Introduction to PostGIS workshop for a tutorial, then use Kapitel 4, Datenverwaltung to understand spatial types, coordinate systems, validity, loading, and indexes.

If you are installing or upgrading PostGIS

Read Kapitel 2, PostGIS Installation and Kapitel 3, PostGIS Verwaltung. Package-specific instructions and supported release information are maintained on the PostGIS website.

If you are writing spatial queries

Read Kapitel 5, Räumliche Abfrage for spatial relationships and index-aware query patterns, and Kapitel 6, Performance Tipps for common performance problems.

If you need a particular function

Use Kapitel 7, Referenz PostGIS or Kapitel 13, PostGIS Spezialfunktionen Index. Function pages state accepted types, dimensional support, standards conformance, dependency requirements, and version availability.

If you use an optional component

See Kapitel 9, Topologie, Kapitel 10, Rasterdatenverwaltung, -abfrage und Anwendungen, Kapitel 11, Referenz Raster, or Kapitel 8, Referenz der SFCGAL-Funktionen.

If something goes wrong

Collect the versions reported by PostGIS_Full_Version and follow Kapitel 14, Meldung von Problemen. Check Anhang A, Anmerkungen zur Release when behavior differs between release lines.

1.5. Standards Support

This manual marks individual functions as compliant with spatial standards so users can tell which behavior is portable and which behavior is a PostGIS extension. PostGIS implements the OGC Simple Features for SQL model, including the geometry type, Well-Known Text (WKT), Well-Known Binary (WKB), and the common spatial accessors, constructors, predicates, and processing functions. PostGIS also implements many SQL/MM Spatial types and functions.

PostGIS supports geometry families defined by later standards, including SQL/MM curved geometry and OGC Simple Features Access 1.2 PolyhedralSurface, Triangle, and TIN. Support for these geometry families is function-specific, and each function page documents the supported input types and conformance level.

PostGIS also includes widely used extensions and integrations. Examples of PostGIS extensions include Extended WKT (EWKT), Extended WKB (EWKB), SRID metadata in those extended formats, geography, and raster. PostGIS also supports input and output exchange formats defined by other standards, such as GeoJSON, GML, and KML. These features are documented individually and should not be read as OGC Simple Features or SQL/MM requirements unless the specific function or format says so.

When the implementation intentionally differs from a standard, or when a standard leaves behavior ambiguous, the relevant function page describes the PostGIS behavior. Kapitel 13, PostGIS Spezialfunktionen Index summarizes SQL/MM compliance and geometry-type support across functions.

1.6. Project and Community

PostGIS began in 2001 as a spatial database research project at Refractions Research. It is now an OSGeo project developed by contributors and organizations around the world. The Project Steering Committee coordinates releases, project policy, and the general direction of development. The complete contributor and sponsor record is in Kapitel 15, Credits and Acknowledgments at the end of this manual.

The manual is the authoritative reference for the released SQL interface. The project website and source tree provide the surrounding material:

  • Documentation routes readers to getting-started instructions, versioned manuals, tips, training material, and the FAQ.

  • Community lists mailing lists, chat, events, videos, and other support channels.

  • Developer documentation covers development environments, testing, coding style, internals, maintenance, governance, releases, and website work.