[mapserver-users] Map Scale

Ed McNierney ed at topozone.com
Mon Nov 11 18:57:48 EST 2002


Vinko -
 
The scale number has no units - a scale ratio, as in "1:25,000" scale.
 
Scale ratios basically make no sense with a digital image, unless you specify the physical output (display or print) resolution of that image in pixels per some physical unit.  By default, MapServer assumes that the output device has a resolution of 72 pixels per inch, and computes the scale ratio that way.
 
For example, if MapServer generated a line that it knows is 12 miles long (because MapServer knows such things), and the resulting image is 144 pixels long (which MapServer also knows since it generated the image), then at 72 pixels per inch the image will be two inches long, which is a scale ratio of 12 miles = 2 inches or 6 miles = 1 inch or 380,160 inches = 1 inch.  That's a scale of 1:380,160, which is what MapServer will report.
 
You can use the RESOLUTION keyword in the MAP file to change the presumed output resolution.  Unless you control the output device completely, reporting the scale as a ratio will never be accurate - but it's what most users expect, so it's worth doing.
 
     - Ed
 
Ed McNierney
President and Chief Mapmaker
TopoZone.com
ed at topozone.com

	-----Original Message----- 
	From: Vinko Vrsalovic [mailto:vinko at cprsig.cl] 
	Sent: Mon 11/11/2002 7:32 PM 
	To: mapserver-users at lists.gis.umn.edu 
	Cc: 
	Subject: [mapserver-users] Map Scale
	
	

	Hello,
	
	I've been looking at the archives, but didn't find a clear explanation
	about this issue: The scale number shown by Mapserver is measured in
	what? and in what ways it can be useful for output?
	
	Because it doesn't make sense viewing the image, compared to what is
	'normal' in real paper maps.
	
	Thanks,
	--
	Vinko Vrsalovic <el[|- at -|]vinko.cl>
	http://www.cprsig.cl
	





More information about the mapserver-users mailing list