[Gdal-dev] Fixing projections with GDAL_TRANSLATE vs. GDALWARP
Rich Signell
rsignell at usgs.gov
Wed Sep 12 12:17:48 EDT 2007
GDAL-folk,
I'm hoping that someone will see in 2 minutes what I've spend 2 hours
trying to figure out.
I was given a GeoTIFF image but the parameters specified for the
projection are obviously wrong, as the latitudes displayed by
"gdalinfo" are about 33 degrees, but should be approximately 43
degrees.
The creator of the image told me the correct projection parameters,
and he wanted a geographic image, so I tried two ways of converting
them:
If I fix the projection and convert to EPSG:4326 in 1 step, using
"gdalwarp", my image "geo1.tif" is correctly geolocated:
$ gdalwarp -s_srs "+proj=merc +lat_ts=41.65 +lon_0=-70.3166667
+datum=nad83" -t_srs EPSG:4326 mb_backpc30m.tif geo1.tif
If I fix the projection and convert to EPSG:4326 in 2 steps, using
"gdal_translate" and then "gdalwarp" my image "geo2.tif" is not
correctly geolocated.
$ gdal_translate -a_srs "+proj=merc +lat_ts=41.65 +lon_0=-70.3166667
+datum=nad83" mb_backpc30m.tif merc.tif
$ gdalwarp -t_srs EPSG:4326 merc.tif geo2.tif
I don't understand why these two operations don't give the same result.
If some kind soul is willing to take a look, the original image is at:
http://stellwagen.er.usgs.gov/rps/share/mb_backpc30m.tif (~6 mb)
-Rich
--
Dr. Richard P. Signell (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598
More information about the Gdal-dev
mailing list