[Gdal-dev] Fixing projections with GDAL_TRANSLATE vs. GDALWARP
Matt Wilkie
matt.wilkie at gov.yk.ca
Fri Sep 14 18:46:36 EDT 2007
Hi Rich,
> Yet it's odd that the very same specification of coordinate system, if
> given to gdal_warp via the -s_crs argument, works correctly. It's
> almost like the -s_crs argument works but -t_crs is not working, or
> else the Merc_1 info is being interpreted correctly when specified on
> the command linke, but written incorrectly written to or read from a
> GeoTIFF file.
To my understanding identical *_srs arguments should have identical
results across all of the gdal utilities. I tested this with your data
and without applying a spatial transform and the output is identical to
gdal_translate using -a_srs, save that some TIFFTAG metadata is stripped.
--- windows .bat ----
@echo off
:: warp vs trans
set inProj="+proj=merc +lat_ts=41.65 +lon_0=-70.3166667 +datum=nad83"
gdalwarp -s_srs %inProj% -t_srs %inProj% mb_backpc30m.tif merc-warp.tif
gdal_translate -a_srs %inProj% mb_backpc30m.tif merc-trans.tif
--------------------
>> This bug is filed as http://trac.osgeo.org/gdal/ticket/1471 - gdalwarp
>> should keep georeferencing info
>
> According to my reasoning, I think this is not a problem of gdalwarp
> not keeping the georeferencing info. It could be a problem of not
> being able to correctly read/write merc 1_sp info into the geotiff
> correctly.
Hmm, yes, I guess that might be where the problem lies. I've been up and
down this so many times I don't know where I am anymore! Time to leave
it for now. :)
> P.S. Should this type of discussion take place here, or in trac ticket comments?
I don't really know. My inclination is to have discussion on the list
and distilled results to the ticket. It's the developers who use the
tickets the most, so I think they would have to weigh in to know which
is actually the most useful in practice.
cheers,
--
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
More information about the Gdal-dev
mailing list