I am extremely new to GIS.
I'm using gdal
to read in a landuse/landcover map and I need to pick out the lat/lng of certain land cover types to index into a different dataset which is expressed only in lat/lng. Unfortuantely, I don't understand the form of the x and y coordinates given to me from the geotransform, specifically the originX
and originY
below:
geotransform = dataset.GetGeoTransform()
originX = geotransform[0]
originY = geotransform[3]
Printing these values gives me coordinates like (447466.693808, 4952570.40529)
. How do these relate to the original latitude and longitude?
Edit:
Here's a simple python example that got me what I was looking for:
srs = osr.SpatialReference()
srs.ImportFromWkt(dataset.GetProjection())
srsLatLong = srs.CloneGeogCS()
ct = osr.CoordinateTransformation(srs,srsLatLong)
print ct.TransformPoint(originX,originY)
Stolen from: tolatlong.py
dataset.GetProjectionRef()
and find out I'm using "UTM Zone 10", but then what? I'm googling around for methods like "unproject" but am coming up null.