What problem does it solve?
AI coding agents often generate spatial database schemas that misuse PostgreSQL's built-in geometric types, omit SRIDs, skip spatial indexes, or write distance queries that cannot use indexes, producing slow and incorrect location-based applications.
Core Features & Use Cases
- Geometry vs Geography guidance: Decision rules and comparison tables for choosing GEOMETRY or GEOGRAPHY types based on data scope, accuracy needs, and performance.
- Spatial indexing patterns: GiST, BRIN, and SP-GiST index selection guidance with concrete CREATE INDEX statements for different data distributions.
- Ready-to-use table designs: Complete schema examples for POIs, property parcels, GPS tracking, and service zones, including generated columns, constraints, and validity checks.
- Use Case: When building a store locator feature, use this Skill to create a
pois table with a GEOGRAPHY(POINT, 4326) column, a GiST index, and an index-supported ST_DWithin query for radius searches.
Quick Start
Design a PostGIS table for storing delivery driver GPS locations with an index-supported query to find drivers within 2 kilometers of a given point.