[mapserver-users] Understanding extents and resolutions

Zach Chehayeb zach.chehayeb at airborne.aero
Thu Oct 1 12:13:04 PDT 2015


Hello All,

Can anyone explain or point me in the right direction on how mapserver logic works when a requested map extent cannot be produced at the requested resolution with square pixels?

I am using mapserver in an application that requests mapserver to produce various map extents at various resolutions. The map config is set to not allow non square pixel (so the MS_NONSQUARE setting is set to no).  The application currently assumes that the extent height should always be half of the width. Of course, with MS_NONSQUARE set to no and producing resolutions where the height is not always exactly half of the width, mapserver is unable to produce the exact extents requested. As such, mapserver compensates by extending either the north and south or east and west bounds of the map. See images in link below for a detailed illustration (the red box indicates the requested extent). For all images below, the requested extent is  x1=-58.615527, y1=50.434875, x2=-13.615527, y2=72.934875, but the actual extents differ.

>From my observations, it seems that there are three cases. I have included a link below where a zip file that has examples of the cases can be downloaded.
https://www.dropbox.com/s/dy1cgmt8lmbl3wf/Example%20Images.zip?dl=0

1.      The requested resolution height is greater than half of the width (1280x720).

a.      Result: MapServer locks on the East and West bounds and extends the North and South bounds of the map.

2.      The requested resolution height is less than half of the width (960x400).

a.      Result: MapServer locks on the North and South bounds and extends the East and West bounds.

3.      The requested resolution height is half of the width (1000x500).

a.      Result: MapServer produces the image at the requested resolution.

Is anyone able to confirm that these are the only three cases or correct my understanding (if there is more to it than I have described)?

Some info about my installation:

1.      MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=FASTCGI SUPPORTS=THREADS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Please let me know if there is any other information needed.

Thanks in advance,

Zach Chehayeb
Application Developer
Email. zach.chehayeb at airborne.aero<mailto:zach.chehayeb at airborne.aero>
Tel No.  +1 949 707 1800
www.airborne.aero

[New Small2]




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20151001/45fceb32/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2577 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20151001/45fceb32/attachment.jpg>


More information about the mapserver-users mailing list