FW: MINSCALE & MAXSCALE Units

Ed McNierney ed at TOPOZONE.COM
Tue Aug 29 09:55:23 PDT 2006


Julian -
 
No, that's not correct.  As Greg pointed out, MINSCALE and MAXSCALE are
scale ratios (actually, scale ratio denominators) and as such have no
units.  Therefore, changing your mapfile UNITS will have no effect.
 
A map scale must refer to two measurements - the size of the object on
the map, and the size of the real, physical object it represents.  I'm
not sure what your "3280m zoom" means, since you're only providing one
of those two numbers - you must mean that 3280m on the ground is
displayed as some particular size on the map, but you don't say what
that size is.
 
There is a problem with digital images and scale ratios.  If MapServer
creates a digital output image, it can't really tell how large it is on
your screen or printer.  You can fiddle with the horizontal and vertical
size controls on your monitor and change the size of that image and
MapServer can't possibly know that.  So if MapServer refers to a scale
of 1:10,000, it means that (for example) 10,000 centimeters on the
ground (100 meters) equals one centimeter on the screen.  But you don't
know how many pixels per centimeter your monitor is showing, so you
can't really know how much of your image is displayed in that one
centimeter on the screen.
 
To get around this problem, MapServer assumes by default that your
output device has a resolution of 72 pixels per inch.  The RESOLUTION
statement in your mapfile can be used to change this default to a
different value.  But it's still just an estimate, since you don't know
the real value on your user's screen.  Setting the RESOLUTION simply
allows you do to the math differently for MAXSCALE and MINSCALE
calculations, which you may find more convenient (it also affects a few
other things).
 
The RESOLUTION and MAX/MINSCALE values together can be used to make some
sense out of this.  In my example above, we now know that MapServer
thinks that there are 72 pixels in one inch on the screen.  A scale of
1:10,000 means 100m on the ground = 1cm on the screen.  There are 2.54cm
in one inch, so 1cm = 28.34 pixels (at 72 pixels per inch).  Your image
shows 100m in 28.34 pixels, so each pixel represents 3.53 meters on the
ground.  That value doesn't change if you modify the size of the image,
and is a more sensible way to think of digital image scale (meters per
pixel).
 
So - a MAXSCALE value of 12000 means that the maximum scale ratio is
1:12,000.  At 72 pixels per inch, that means that 72 pixels (one inch) =
12,000 inches on the ground.  12,000 / 72 = 166.667 inches per pixel, so
each pixel is 4.2344 meters on the ground.  When a pixel would cover
more than 4.2344 meters of ground, that layer will be turned off because
you exceeded the MAXSCALE setting.
 
I can't figure out your "scale factor" without the other half of your
scale definition (3280m = ???), but I'd be happy to work through that
example if you provide the additional information.
 
    - Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 


________________________________

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Julian Parker
Sent: Tuesday, August 29, 2006 12:45 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] FW: MINSCALE & MAXSCALE Units



Greetings list,

 

It was my assumption that I could set UNITS as meters in a layer and
that the MIN & MAX SCALE values would utilize these units. This does not
seem to be the case - a MAXSCALE value of 12000 on one layer will have
the layer display at 3936m zoom. Another layer with a MAXSCALE of 10000
will display at 3280m zoom. The 'scale factor' equals about 3.05. How is
it that this 'scale factor' can be altered or the units used for scale
changed? What am I missing?

 

Thanks in advance!

 

Regards

Julian Parker
Systems Analyst

Digital Mapping Solutions
Level 2, 2 Hardy Street
SOUTH PERTH WA 6151
Ph: 08 9474 6311 Fax: 08 9474 6411
Mobile: 0438 844 079
www.mapsolutions.com.au <http://www.mapsolutions.com.au/>  

 

MapInfo Training
<http://www.mapsolutions.com.au/services/training/index.html> |
IntraMaps <http://www.mapsolutions.com.au/products/intramaps/index.html>
| InterMaps
<http://www.mapsolutions.com.au/products/intermaps/index.html>  |
MobileMap <http://www.mapsolutions.com.au/products/mobilemap/index.html>
| News <http://www.mapsolutions.com.au/news/index.html> 

 

 

Disclaimer

This email and any files transmitted with it are intended solely for the
use of the individual or entity to whom they are addressed.

Although every effort has been made to ensure the correctness and
integrity of attachments that may be included in this email, this can
only apply to the unaltered/uncorrupted form. A copy of the original
attachment is available from our office should you require it. 

Alternately, if further verification is required please request a hard
copy version.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060829/511956b6/attachment.htm>


More information about the MapServer-users mailing list