[gdal-dev] need help with geo-referencing
Wendell Turner
wendell at enflight.com
Wed Feb 17 20:30:04 EST 2010
I'm trying to geo-reference a .tif image, but the
corner coordinates don't change. I used gimp to get the
pixel and lat/lng of 4 points on the image. I converted
the lat/lng to the desired coordinates, then used this
command:
gdal_translate \
-a_srs epsg:3395 \
-gcp 1954 1085 -8682920.2818 4766363.8392 0 \
-gcp 1954 4581 -8682920.2818 4623698.8898 0 \
-gcp 7376 1085 -8460281.3002 4766363.8392 0 \
-gcp 7376 4581 -8460281.3002 4623698.8898 0 \
bw_unref.tif \
bw_ref.tif
That command produced an output file, but gdalinfo shows the
corner coordinates are still in pixels:
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 5764.0)
Upper Right ( 7995.0, 0.0)
Lower Right ( 7995.0, 5764.0)
not the easting/northing that I expect; other files that are
geo-referenced have coordinates like this::
Corner Coordinates:
Upper Left (-8710773.534, 4802386.689) ( 78d15'0.76"W, 39d45'0.87"N)
Lower Left (-8710773.534, 4588376.402) ( 78d15'0.76"W, 38d15'0.77"N)
Upper Right (-8460315.902, 4802386.689) ( 76d 0'1.12"W, 39d45'0.87"N)
Lower Right (-8460315.902, 4588376.402) ( 76d 0'1.12"W, 38d15'0.77"N)
Also, the coordinate system parameter in the geo-referenced
file is a nicely formatted/indented hierarchy. In the one I
tried to create it shows as one long string, with `' at the
beginning, as if it isn't really parsed or a part of the
file.
What do I need to do to get the output file to have the
correct coordinate system?
Thanks,
Wendell
More information about the gdal-dev
mailing list