[gdal-dev] WMS Issues Two Requests

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Fri Feb 7 04:52:08 PST 2014


Martin Lewis <MLewis <at> ngms.eu.com> writes:


> It seems that when it was originally converted to GDAL, the previous
> engineer used the same 'bbox' parameters in the DataWindow extents. The
> original 'width' and 'height' values are passed in the SizeX and SizeY tags
> in the XML
> 
> From what you are suggesting, this is totally wrong usage for these
> parameters in the XML. 

No, I just made a wrong guess. You are allowed to tweak with the XML file
and it should work if the XML is created dynamically and correctly for each
request.

For preventing the second request just take out the blocksize elements or
better, put them to suit with the limits set by the WMS server. If you do
not know those limits, they are easy to test. Width=953 is OK here
http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=953&HEIGHT=480&LAYERS=bluemarble,continents,country_bounds,cities&STYLES=&FORMAT=image/png&TRANSPARENT=true

but width=3000 will give an error; iterate and you will find that the server
is using the Mapserver default value 2048.

-Jukka Rahkonen-



More information about the gdal-dev mailing list