MAXIMGSIZE in mapfile

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu Jul 5 17:48:57 EDT 2007


There is a MAXSIZE parameter in the map object already that serves this purpose if
I am not mistaken. It sets the maximum number of pixels in either image dimension
and defaults to 1024. Both the CGI interface and WMS validate against it. It cannot
be changed via URL. It's in the mapObj reference file...

Steve

>>> On 7/5/2007 at 11:52 AM, in message <C2B28BF0.D675%pmoen at nd.gov>, Paul Moen
<pmoen at ND.GOV> wrote:
> I have been looking for a way to set the max image size in the mapfile and I
> have found the text at the bottom in the archives, but see nothing in the
> documentation on whether or not this is possible.  Does anyone have any
> information if the maximum image size can be changed by adding the
> MAXIMGSIZE to the mapfile rather than recompiling.  I have tried to add it
> to my mapfile but I get an error, which could mean that I am putting it in
> the wrong part of the mapfile.
> 
> Frank Warmerdam wrote:
>> 
>> It is my humble opionion that only remote client requests (via URL) should
>> be checked against this, not image sizes read from .map files or those
>> originating from mapscript requests.  If appropriate folks agree, I could
>> look into making this change.  Ideally we would also have a MAXIMGSIZE
>> directive that could be included in .map files so this could be set
>> without recompiling mapserver - which is very hard for some folks to do.
>> 
> 
> I agree this would be a welcome change.  BTW, if you create a new
> MAXIMGSIZE directive then don't forget that the test on MAXIMGSIZE
> should be applied to the WMS as well (mapwms.c).  Also it should not be
> possible to change those maxsize values via the CGI interface.  Perhaps
> a bug should be created for this to track everything including required
> updates to the docs, etc.
> 
> Daniel



More information about the mapserver-users mailing list