Skip to content

Instantly share code, notes, and snippets.

@ian29
Created April 26, 2013 17:37
Show Gist options
  • Save ian29/5468942 to your computer and use it in GitHub Desktop.
Save ian29/5468942 to your computer and use it in GitHub Desktop.
convert a lat lon pair to google mercator meters
function coords2meters() {
psql -d osm -c "select st_astext(st_transform(st_geomfromtext('POINT($1 $2)', 4326) ,3857));"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment