[gdal-dev] Converting between datum

Frank Warmerdam warmerdam at pobox.com
Sun Jun 1 08:01:53 EDT 2008


Andreas Theofilu wrote:
> What I'm doing wrong? Is it the WMS server who gives me a wrong result or is 
> there something else I should do to shift my track to the right place? 
> Because I understand only the very most basics, I'm lost.

Andreas,

I tried the file, and saw the effect you were seeing (just a simple
gdal_translate track.wms out.tif shows the effect).

I noticed that the .wms file definition was such that non-square
pixels were being requested from the server.  I tried changing this to
use square pixels (by adjusting the extents) and things then seemed
to work fine.  I examined the actual http requests being made, and as
far as I can see GDAL was requesting the tiles properly in the non-square
pixel case, so I'm guessing the server doesn't handle non-square pixels
properly even though it is expected under the WMS specification.  This was
a problem with MapServer's WMS implementation for a few years for instance.

So, try changing your DataWindow definition to:

    <DataWindow>
       <UpperLeftX>617400</UpperLeftX>
       <UpperLeftY>481865</UpperLeftY>
       <LowerRightX>626560</LowerRightX>
       <LowerRightY>480365</LowerRightY>
       <SizeX>916</SizeX>
       <SizeY>150</SizeY>
    </DataWindow>

BTW, I don't think it is meaningful for you to have <SRS> set to
EPSG:31287 and <CRS> set to EPSG:4326 in your WMS file.  This does not
appear to cause any sort of reprojection, so you should really have
both of these set the same (to EPSG:31287).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list