[mapserver-dev] Scale calculation discrepancies

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Apr 18 16:05:14 EDT 2008


Scale computations are based on the resolution of the display device which is, of course, problematic since
you don't know how a map might be displayed. Still, you have to assume something and MapServer use a
default output resolution of 72 pixels per inch. Way back that matched a typical 17" monitor set at a typical
resolution (800x600 I think). You can alter that value using the RESOLUTION parameter in the MAP object.

>From your data it looks like ArcMap is using a different value as at least the numbers are consistent. uDig looks
that way too for awhile at least. Not sure why the drastic change.

Steve

>>> On 4/18/2008 at 2:45 PM, in message <4808FA60.9000002 at project10.net>, Shawn
Gervais <project10 at project10.net> wrote:
> Devs,
> 
> I've been trying to figure out why layers, which use MIN/MAXSCALEDENOM 
> have labels and layers turn on seemingly at incorrect scales. I hacked 
> mapdraw.c to show me map->scaledenom in msDrawMap(), and these numbers 
> are, in some cases, dramatically off from what various WMS clients 
> report the scale as.
> 
> Do I have some kind of misunderstanding of what the scale denominator 
> is? If not, how does one use MIN/MAXSCALE so that it behaves predictably?
> 
> Here's my data:
> 
> MS Scl		ArcMap Scl	MS Fract'n of AM
> 95688		127671		0.74948892074159362737035035364335
> 127584		170228		0.74948892074159362737035035364335
> 170307		226971		0.75034696062492565129465878900829
> 302421		403504		0.74948699393314564415718307625203
> 403228		538006		0.74948606521116864867678055635067
> 955801		1275273		0.74948736466623224987904550633472
> 1275868		1700364		0.75034992507486632274030736948089
> 1700306		2267152		0.74997441724242573942991030155896
> 
> (In this case, WMS requested EPSG:4326, data in EPSG:42102/EPSG:3005)
> 
> MS Scl		uDig Scl	MS Fract'n of UD
> 801614		698182		1.1481447530873038835146136680694
> 356612		308959		1.1542372936214837567444223990886
> 162279		140569		1.1481447530873038835146136680694
> 10212		20656		0.49438419829589465530596436870643
> 2423		4198		0.57717960933777989518818484992854
> 
> (In this case, WMS requested EPSG:3005, data in EPSG:42102/EPSG:3005)
> 
> -Shawn
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list