postgres-impl-postgis-geometry-2d

Installation
SKILL.md

postgres-impl-postgis-geometry-2d

Quick Reference :

PostGIS adds two spatial column types to PostgreSQL. geometry uses planar (flat) math in the units of its coordinate system : fast, supports every PostGIS function, but distances are meaningful only in a projected SRID. geography uses spheroidal math on the WGS84 ellipsoid : slower, smaller function set, but distances are always in meters and correct globally.

Three rules drive every spatial query :

  1. ALWAYS create a GIST index on the spatial column. Without it, every spatial predicate falls back to a sequential scan.
  2. ALWAYS use ST_DWithin(a, b, dist) for proximity filters, NEVER ST_Distance(a, b) < dist. Only ST_DWithin keeps the GiST index.
  3. ALWAYS keep both operands in the same SRID. Mixed SRIDs raise an error or silently produce wrong answers. Reproject with ST_Transform.
Installs
2
GitHub Stars
1
First Seen
Jun 17, 2026
postgres-impl-postgis-geometry-2d — impertio-studio/postgresql-claude-skill-package