PLUTO reverse geocode SQL
✓ Published0🌍 Public
Aandrewxhill
Last edited Aug 14, 2013
Created on Aug 14, 2013
This example demonstrates a SQL function that reverse geocodes a pair of latitude and longitude coordinates against New York City’s PLUTO parcel dataset. It returns up to three nearby addresses, owner names, and their straight-line distances from the input point. The function, written in SQL and using PostGIS spatial functions, first queries the `nyc_mappluto_13v1` table for the 20 nearest geometries via the `CDB_LatLng` and the `<->` operator, then filters and sorts those candidates by distance. It uses `ST_Distance` with a geography cast to compute metric distances.
AI-generated description