GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - postgis-python/postgis-python.com: Production-grade PostGIS + Python documentation: spatial queries, GiST indexing, SQLAlchemy/GeoAlchemy2 integration, schema migrations, and performance tuning — runnable SQL + Python, no pseudocode.

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
_data
_data
 
 
_includes
_includes
 
 
assets
assets
 
 
content
content
 
 
.eleventy.js
.eleventy.js
 
 
README.md
README.md
 
 
_headers
_headers
 
 
netlify.toml
netlify.toml
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
robots.njk
robots.njk
 
 
sitemap.njk
sitemap.njk
 
 
wrangler.jsonc
wrangler.jsonc
 
 

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

  • Core Spatial Query Patterns — bounding-box filtering with the && operator, ST_DWithin radius searches, KNN <-> nearest-neighbor queries, and spatial joins.
  • Advanced GiST Indexing & Optimization — partial and composite indexes, index-only scans, EXPLAIN (ANALYZE, BUFFERS) interpretation, and choosing between GiST, SP-GiST, and BRIN.
  • SQLAlchemy & GeoAlchemy2 Integration — model mapping, session management, hybrid geometry properties, type coercion / serialization, driver selection, and async streaming.
  • Spatial Schema Migrations & Evolution — adding geometry columns to live tables, in-place SRID reprojection, concurrent index builds, and zero-downtime backfills.
  • Spatial Performance Monitoring & Observability — pg_stat_statements for spatial hotspots, GiST index bloat detection, and autovacuum tuning for geometry-heavy tables.

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.

www.postgis-python.com

Topics

database-performancedocumentationeleventygeoalchemy2geospatialgisgist-indexpostgispostgresqlpsycopgpythonquery-optimizationshapelyspatial-databasespatial-queriessqlalchemy

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.