[mapserver-users] What does scale mean?

Doyon, Jean-Francois Jean-Francois.Doyon at ccrs.nrcan.gc.ca
Mon Mar 11 16:50:58 EST 2002


Well,

The scale is calculated based on the UNITS you define for your map.

Scale is calculated by using the number of inches per unit, and using 72 dpi
(web GIF resolution), and the width of your image.

For instance, if your shapefile is in meters (I use LCC), and your output
image is 420 pixels wide, then your scale is (420/72*39.3701)/(maxx-minx)
...
(39.3701 inches per meter)


The best source for info is reading mapscale.c :

    md = width/(resolution*inchesPerUnit[units]); // was (width-1)
    gd = extent.maxx - extent.minx;  
    *scale = gd/md;
    break;   

Cheers,
J.F.

-----Original Message-----
From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Sent: Thursday, March 07, 2002 7:07 PM
To: MapServer List
Subject: [mapserver-users] What does scale mean?


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