parenthesis enclosed NYC open data lat/lon to the_geom
✓ Published0🌍 Public
Aandrewxhill
Last edited Oct 26, 2012
Created on Oct 26, 2012
A SQL snippet converts NYC Open Data latitude/longitude coordinates stored as parenthesized text in a column into the `the_geom` geometry field for PostGIS. The example shows how to parse a string like `(lat, lon)` by stripping parentheses, splitting on commas, and reordering the values into `ST_MakePoint` before applying `ST_SetSRID` with EPSG:4326. This enables spatial queries and map rendering from raw tabular coordinate data. The command targets a placeholder table and column, making it adaptable to any dataset with similar text-encoded points.
AI-generated description