Skip to content

postgis-python/postgis-python.com

Repository files navigation

PostGIS + Python — Query & Indexing Workflows

Production-grade spatial database engineering for backend developers, GIS admins, and platform teams.

🌐 www.postgis-python.com

A free, in-depth documentation site covering the full stack of building fast, reliable spatial systems with PostGIS and Python — from bounding-box pre-filters and KNN distance operators to GiST index architecture, ORM integration, live schema migrations, and production performance monitoring. Every pattern pairs runnable PostGIS SQL with real psycopg / SQLAlchemy 2.0 / GeoAlchemy2 / Shapely integration code — no pseudocode.

Why this site

Spatial workloads rarely fail from a single missing index. They fail from misaligned index architecture, query-planner misestimates, and driver-level translation issues that only show up under load. These guides bridge the gap between PostGIS internals and Python application patterns, with EXPLAIN-plan walkthroughs, explicit SRID handling, and copy-paste-ready implementations validated against production-shaped workloads.

What's covered

Tech stack

  • Eleventy static site generator (Nunjucks + Markdown)
  • Hand-authored, theme-adaptive inline SVG diagrams
  • Structured data (JSON-LD), accessible (WCAG 2 A/AA) markup, and a PWA service worker
  • Deployed on Cloudflare Workers (Static Assets)

Local development

npm install
npm start          # local dev server with live reload
npm run build      # build to _site/
npm run deploy     # build + deploy to Cloudflare Workers

Contributing

Spotted an error, an outdated PostGIS/Python idiom, or a pattern worth adding? Issues and pull requests are welcome.

License

Content and code © the PostGIS + Python project. See the repository for details.

About

Production-grade PostGIS + Python documentation: spatial queries, GiST indexing, SQLAlchemy/GeoAlchemy2 integration, schema migrations, and performance tuning — runnable SQL + Python, no pseudocode.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors