[mapserver-dev] Scale calculation discrepancies

Christopher Schmidt crschmidt at metacarta.com
Fri Apr 18 16:01:11 EDT 2008


On Fri, Apr 18, 2008 at 02:45:36PM -0500, Shawn Gervais 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:

These 'scales' are based on different DPI assumptions. MapServer assumes
72: 72 * .75 -> 96, so ArcMap assumes 96...

> MS Scl		ArcMap Scl	MS Fract'n of AM
> 95688		127671		0.74948892074159362737035035364335

Normally, I'd have guessed that uDig would report scale based on a DPI
assumption of ~90.28 (or something like that), matching the SLD spec,
but that doesn't seem to be the case here. I really don't know what's up
in this case.

For display on a monitor, scale is a somewhere weird notion anyway, but
it seems like these differences are likely related in some way to
different DPI assumptions... thought that doens't explain the dichotomy
here, it does explain the ArcMap differences.

> 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)

Regards,
-- 
Christopher Schmidt
MetaCarta


More information about the mapserver-dev mailing list