Skip to content

Instantly share code, notes, and snippets.

@colllin
Last active May 25, 2022 22:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save colllin/2ce41ddc24bed585d657decf39080fae to your computer and use it in GitHub Desktop.
Save colllin/2ce41ddc24bed585d657decf39080fae to your computer and use it in GitHub Desktop.
GDAL: Convert from UTM Zone to Lat/Lon (EPSG:4326)
$ gdalsrsinfo source.shp
PROJ.4 : '+proj=utm +zone=34 +south +datum=WGS84 +units=m +no_defs '
OGC WKT :
PROJCS["WGS_1984_UTM_Zone_34S",
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",21],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",10000000],
UNIT["Meter",1]]

Go to http://epsg.io

Search for e.g. "WGS 84 34S"

Copy the EPSG:**** code from the search results

$ ogr2ogr -f GeoJSON target.json source.shp -s_srs EPSG:32734 -t_srs EPSG:4326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment