don't understand scale

Matthew Perry perrygeo at GMAIL.COM
Wed Aug 3 22:31:51 EDT 2005


Douglass,

  Scale is usually the ratio of "Map" coordinates to "Real"
coordinates and is usually expressed as something like 1:24000. So 1
inch on the map equals 24000 inches on the ground. To simplify things
(or complicate them perhaps) alot of GIS programmers would refer to
this scale value as simply 24000.

So if your "real" area is 100 feet wide and 200 feet tall and you're
looking at the full extent on a paper map that measures, say, 1 ft by
2 ft, your scale would be 1:100 or, in mapserver speak, just 100.

The problem comes in with rendering digital map images. A 500
pixel-wide image will not have a consistent width on everyone's
monitor (it depends on resolution, monitor size, etc). I _believe_
that mapserver gives a default of 72 pixels per inch.

That should give you enough to figure out the math behind the scale
calculations.

matt


On 8/3/05, Douglass Davis <douglass_davis at earthlink.net> wrote:
> Ok, so the scale is relative to the units used in the mapfile.  I still
> don't quite understand.  This example would help me a lot if any one
> could explain it.
> 
> let's say I have a map with (fictitional units)
> 
> EXTENT 100 100 200 300
> 
> Now...  For example, what scale number will I have to use in zoomScale
> to get a map scaled to exactly 100%.  Meaning, exactly the same map I
> would get without scaling.  From that number I can get the other scales.
> 
> And can any one explain how they got this mathematically?
> 
> ---
> http://www.douglassdavis.com
> 
> 
> Douglass Davis wrote:
> 
> > I am using php mapscript, and i want to zoom in to a point.  I have
> > two options:
> >
> > zoomPoint and zoomScale...  I understand zoomPoint, because it just
> > zooms by a percentage.  But, zoomScale, I am not understanding.  It
> > zooms to a certain scale, which is a double.  What does that scale
> > represent? What is the scale relative to?  The docs don't really
> > explain this well.
> >
> > The reason I wanted to do this, is because instead of  zooming in and
> > out relative to the previous map's extent, it would be better if I had
> > about 9 zoom levels, kind of like mapquest.  level 1 would show the
> > states, level 9 would be a close up of the street.   But each of the 9
> > levels would be a fixed zoom amount, relative to the size of the
> > original extent in the mapfile possibly.   Is this difficult to do?
> >
> > --
> > http://www.douglassdavis.com
> >
> 


-- 
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net



More information about the mapserver-users mailing list