[MAPSERVER-USERS] Problems calculating MAXSCALES

Steve Lime Steve.Lime at dnr.state.mn.us
Thu Aug 14 08:57:48 EDT 2008


Your assuming that an extent in ESRI represents the same thing MapServer. It doesn't assuming an ESRI extent is UL corner of UL pixel and the LR corner of the LR pixel for the rendered map. MapServer would use the centers of each pixel. You need to account for those differences when comparing the two. (MapServer has roots with ERDAS Imagine and that was the model it used at the time.) Compute cellsize from the ESRI extent (maxx-minx)/width and then offset the extent by 1/2 cellsize (UL + cellsize, LR - cellsize) to get the MapServer equivalent. If you do that then the scales will match.

Perhaps this will change at some point and lead to even more confusion.

Steve 

>>> Rob <gis at vanbooth.com> 08/14/08 3:04 AM >>>
>2) ESRI desktop scale computations do not match MapServer computations. Again true probably because
>the number of pixels per inch value used in each package is different. The underlying pixel/extent model
>shouldn't matter I guess.

We had to modify the RESOLUTION in the mapfile to 96 to match the ESRI
values.  Hence our scale calculations agreed with theirs previously.

> In this case I think Rob is seeing the effect of 1) and if so would need to adjust his layer MAXSCALE and
> move on.

Unless I'm mistaken though, the margin of error is based on the image
size, and this could be different values depending on the map size
selected on the GIS client.  That means that whilst modifying the
MAXSCALE values I can reduce the margin of error by estimating a
standard size, but it will never be right for all clients.

I haven't tried a later build yet, but if the code hasn't changed I'd
imagine my problem remains also.



More information about the mapserver-users mailing list