{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreid73cdcoo5ed3pssx3ap6pz4b5mhddgvsgj3nychnmvferdcjpgym",
    "uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mloha5jop2c2"
  },
  "description": "PostGIS is the geospatial extension for PostgreSQL. It adds geometry and geography data types, hundreds of spatial functions, spatial indexes (GiST, SP-GiST, BRIN), and conformance to the OGC Simple Features standard. PostGIS is the de facto open-source geospatial database, used by mapping platforms, logistics systems, and any application that asks \"what is near here\".\n\n\nWhat it provides\n\n * Geometry types. Points, lines, polygons, multi-geometries, geometry collections, with optional Z and M di",
  "path": "/engineering-glossary/postgis-postgresql-geospatial/",
  "publishedAt": "2026-05-12T18:46:42.000Z",
  "site": "https://sahilkapoor.com",
  "tags": [
    "PostgreSQL",
    "SQL",
    "pgvector"
  ],
  "textContent": "**PostGIS** is the geospatial extension for PostgreSQL. It adds geometry and geography data types, hundreds of spatial functions, spatial indexes (GiST, SP-GiST, BRIN), and conformance to the OGC Simple Features standard. PostGIS is the de facto open-source geospatial database, used by mapping platforms, logistics systems, and any application that asks \"what is near here\".\n\n## What it provides\n\n  * **Geometry types.** Points, lines, polygons, multi-geometries, geometry collections, with optional Z and M dimensions.\n  * **Geography type.** Like geometry but computed on a sphere (or spheroid) so distances are in metres, not degrees.\n  * **Spatial predicates.** `ST_Intersects`, `ST_Contains`, `ST_Within`, `ST_DWithin`, `ST_Distance`, and many more.\n  * **Transforms.** Reproject between coordinate systems via `ST_Transform` and the projection database (EPSG codes).\n  * **Spatial indexes.** GiST indexes accelerate proximity queries from full scans to milliseconds.\n  * **Raster support.** Store and query raster data alongside vector geometries.\n\n\n\n## Common queries\n\n  * \"Find all coffee shops within 500 metres of this point\" - `ST_DWithin` + spatial index.\n  * \"Which census tract contains this address?\" - point-in-polygon via `ST_Contains`.\n  * \"Compute drive-time isochrones\" - combine PostGIS geometry with routing extensions (pgRouting).\n\n\n\nšŸ”—\n\n**Related Terms**\nPostgreSQL, SQL, pgvector.",
  "title": "PostGIS",
  "updatedAt": "2026-05-13T19:14:32.769Z"
}