postgis-dwithin

Installation
SKILL.md

ST_DWithin (Distance / Proximity Queries)

Use this skill when you need to find features within a given distance of another geometry:

  • “points within X meters of a line”
  • proximity searches around a point
  • replacing expensive buffer + intersects patterns

Core rules

  • ST_DWithin is faster than ST_Distance < x
  • Units depend on input type:
    • geometry → SRID units
    • geography → meters
  • Geometries must be in the same SRID
  • Prefer ST_DWithin over buffering when you only need a boolean test

Canonical patterns

Related skills
Installs
8
First Seen
Feb 9, 2026