[mapserver-users] What does scale mean?

imap at chesapeake.net imap at chesapeake.net
Fri Mar 8 00:40:02 EST 2002


Steve,

in mapscale.c....

For METERS inchesPerUnit = 39370.1
resolution = 72 (pixels per inch)

md = width / (resolution*inchesPerUnit)
gd = extent.maxx - extent.minx

scale = gd/md

However, when I plug my METERS values into this formula, 
I had to multiply scale by 100 to get the right answer.
I am not sure why that is, but...  it seemed to produce
the correct value (or very close to it).

I could not find anything in the code to deal with UNITS
(inchesPerUnit) for DD Decimal Degrees...

When going thru this exercise, I generated a map with UNITS
METERS a scale of 1:200000, but I am not sure what this 200000
actually is.  Maybe it is 200000 map units or something???
The scalebar with the map I generated was measures the map width
on the screen to be approximately 28 miles across.   I was trying
to extrapolate miles from the scale, but I could not figure that
part out.  Does any know how to convert the mapscale units to miles?

Regards,

Chris Stuber (mapsurfer)
Silicon Mapping Solutions, Inc.



Stephen Woodbridge wrote:
> 
> OK, this may seem like a dumb question, but it occurs to me that I don't
> think I know what scale means in MapServer context.
> 
> For example, if I am displaying a map file with units METERS and my
> Scale is 1:1000 how are SCALE, UNITS, PIXELs related? What if my units
> are DD?
> 
> TIA,
>   -Steve



More information about the mapserver-users mailing list