[mapserver-users] How retrieve the maxsize information with anhttprequest

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Wed Jan 30 01:50:24 PST 2013


Although this would work you definitely will loose some friends out
there if you go and set there server under attack :( Lets say you start
with 400px and the server sets a limit of 4096px then you will request
400px, 800px, 1600px, 3200px 6400px, 4800px, 4000px, 4400px, 4200px,
4100px, 4050px, 4075px... to get an accuracy of <32px. And in general
limits on width and height are indepenent of each other and should be
discovered separatly. Now consider that on a server that's already under
load. You can go with it but you won't be a nice guy anymore...

> How about making an utility that captures the layer bounds 
> from GetCapabilities, takes the centre point of the bounds, 
> checks the min/max scale limits from the GetCapabilities and 
> then calculates a reasonable BBOX and makes a GetMap query 
> with WIDTH=400  and HEIGTH=400.  By increasing the outputsize 
> incrementally the server sooner or later sends back something 
> else than a valid image and that was it. 
> 
> -Jukka Rahkonen-


More information about the mapserver-users mailing list