[mapserver-users] map scale questions

Ed McNierney ed at topozone.com
Mon Aug 5 21:56:50 EDT 2002


Alex -

The fundamental problem is that using scale ratios (e.g. 1:5015) to
express the scale of digital maps is meaningless unless you also specify
and/or control the resolution of the output device (screen or printer).

Let me give you a raster example that might help.  The standard USGS
printed topographic maps are usually at a scale of 1:24,000 or 1 inch =
200 feet.  These maps are then scanned at 250dpi to create digital maps.
The digital maps therefore have a true spatial resolution of 2.4384
meters per pixel.  IF (and only if) you display or print that image at
250dpi, you will get a 1:24,000 scale map.  If you display the scanned
image on the screen at 1 pixel = 1 pixel (i.e. 100% scale) then you
WON'T be viewing a 1:24,000 scale image because your monitor's
resolution is not 250dpi.

MapServer by default uses a 72dpi output device for scale ratio
calculations.  That means that when MapServer generates an image, one
inch on that image will equal 5015 inches on the ground IF the map is
displayed at 72dpi exactly.  Your monitor probably does NOT display at
exactly 72dpi.

I'm not a MapInfo user, but what projection is your data stored in?  I
know you're not reprojecting the data, but are you correctly expressing
the measurements of your data files?  That is, an ESRI shapefile does
not store units - coordinates are dimensionless numbers and you need to
tell MapServer what units they are in order to get things right.  If
everything's the same, then by telling MapServer (in your MAP section of
the map file) that all source data units (and output data units) are in
miles.  Is this correct?

MapInfo may also be misleading you when reporting that "1 in = 3 mi" -
one inch on what?  On the screen?

Sorry to have more questions than answers, and I feel like I'm not being
very clear here.  It's likely that several things are happening at once.

Can you describe your source data in as much detail as possible
(projection and units) and describe the MapInfo display you're trying to
replicate?  If there's anything we could look at online that would help,
as would some input from a MapInfo user!

	- Ed

Ed McNierney
Chief Mapmaker
TopoZone.com


-----Original Message-----
From: Alex Rice [mailto:alex_rice at arc.to] 
Sent: Monday, August 05, 2002 8:57 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] map scale questions


Hi, I think my mapserver scale output is wrong, and my scalebar 
graphic is definitely skewed. I am stumped after looking at the 
docs, tutorials and the mailing list archive.

I have a map table which viewed in MapInfo Pro tells me, the 
Scale: 1 in = 3 mi (for this particular extent I am looking at).

So, in my mapfile MAP section I put
UNITS miles
and in my mapfile SCALEBAR section I put
UNITS miles

Then I view the same map & approx same extent in mapserver (OGR 
reading mapinfo .tab), I get from mapserver scale = 1 : 5015 and 
the scalebar renders as 1 bar = 0.16 mi. Clearly this is way off 
from the 1 in = 3 mi which Mapinfo was saying.

But also mapserver scale 1:5015 does not equal the scalebar 1 
bar = 0.16 mi !
If the scalebar is 1 inch, then 1 inch = 5015 inches = 418 feet = 
0.079 mi.

So it's as if Mapinfo, the mapserver [scale] and the mapserver 
scalebar image all are using different scales?

I am using no projections in my mapfile. I have saved all my 
Mapinfo files with a common projection so I can avoid 
reprojecting in mapserver. Do I need projections defined to make 
the scale come out correctly?

I am just really confused about how to get mapserver to display 
the same scale as Mapinfo Pro. Any suggestions would be 
appreciated.

TIA

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alex_rice at arc.to
alrice at swcp.com





More information about the mapserver-users mailing list