[Gdal-dev] Re: Transformation from UTM32 WGS84 (EPSG:32632) to latlong (EPSG:4326)

WolfgangZ wollez at gmx.net
Fri Aug 10 05:23:43 EDT 2007


shortyII schrieb:
> 
> Frank Warmerdam-2 wrote:
>> Hi,
>>
>> The above coordinates are not UTM 32 meter values.  The earth is only
>> roughly 40 million meters around at the equator, so an x offset of
>> 32 million meters is crazy.  Transverse Mercator rapidly degrees past
>> about
>> 10 degrees off the central meridian.
>>
>> So, I think the problem is that the input coordinate system is not UTM 32
>> *or* you have the units wrong or the file was essentially screwed up by
>> some previous attempt to convert it to utm 32.
>>
>>
> 
> Hi,
> This coordinates are UTM 32. The first 2 numbers of the easting describe the
> UTM strip (32). This notation is quite common (at least at  german federal
> agency for cartography and geodesie). 
> I could read about this problem quite often here in the mailing-archive, but
> I couldn't find any solution. Is there a possibility to correct the gtiff .
> The federal agenceny explains:
> "As download text files are offered that contain a definition of the
> georeferencing for use in the PROJECT command of ArcInfo Workstation. For
> the UTM projections the indication "xshift 3..." applies to a use of the
> parameters under OUTPUT. For a use under INPUT "xshift -3..." has to be
> applied or the accurate definition of your UTM coordinates has to be
> considered, respectively."
> Can gdalwarp do any "xshifts" ?
> Thanks for helping!
> 

I don't know if there is a more elegant way to do it but you can try the 
  following approach:

1. create a Virtual Raster File for your input map
gdal_translate -of VRT map.tif map.vrt
2. the vrt file is just a ascii file:
edit the lines
"<DstRect xOff="0" yOff="0" xSize="5000" ySize="5000"/>"
to
"<DstRect xOff="-32000000" yOff="0" xSize="5000" ySize="5000"/>"
(you have to do it for all bands in your input map)
3. use the vrt as input for gdal_warp (or for gdal_translate if you just 
want a corrected input map).

Regards
Wolfgang






More information about the Gdal-dev mailing list