[Mapserver-users] Scale meaning

Richard Greenwood Rich at GreenwoodMap.com
Mon Jun 9 11:32:14 EDT 2003


--=======67666783=======
Content-Type: text/plain; x-avg-checked=avg-ok-35C52E9; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

At 04:42 PM 6/9/2003 +0200, you wrote:

>Hello, I'm trying to get the meaning of the SCALE value
>as returned by [scale] in map templates (mapObj->scale).
>
>How can you express it in human language ?
>
>For example: 37554.078269 <- what is it exactly ?
>
>If I write in a mapfile that a Layer is not worth drawing
>with a mapscale bigger then 37554.078269 what am I referring to ?
>
>So long I can only use empirical [scale] checks to set MAX/MIN SCALES
>in mapfile, but I'd like to be more "formal" in writing mapfiles.
>
>
>TIA
>--strk;

Scale is a ratio e.g. 1:37554.078269 in your case. It assumes a screen 
resolution of 72 pixels/inch, so 1 inch on your screen = 37554.078269 real 
world inches. Obviously it's an approximation due to varying screen sizes. 
The documentation says: "The exact value is not appropriate for user 
information but essential for some applications." I still think it's handy 
to display, especially when setting up layer min/max scale, so I tidy it up 
with some JavaScript:

<script language="JavaScript">
    document.write("Scale 1:" + Math.round([scale]/100)*100);
</script>

Rich


Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich at GreenwoodMap.com
(307) 733-0203
http://www.GreenwoodMap.com 

--=======67666783=======--




More information about the mapserver-users mailing list