Skip to content

Instantly share code, notes, and snippets.

@bertbalcaen
Created January 14, 2015 18:24
Show Gist options
  • Save bertbalcaen/9f2731f61f9680e3cc67 to your computer and use it in GitHub Desktop.
Save bertbalcaen/9f2731f61f9680e3cc67 to your computer and use it in GitHub Desktop.
Convert geometry from an OpenStreetMap Postgress database into latitude/longitude
SELECT name, ST_Y(ST_Transform(geometry, 4326)) AS lat, ST_X(ST_Transform(geometry, 4326)) AS long
FROM osm_places;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment