[mapserver-users] Scale/Scale Bar anomaly

Steve Lime steve.lime at dnr.state.mn.us
Mon Mar 11 10:27:09 PST 2002


There were a couple of changes between versions. First the width-1 vs
with computation was done
to make the way MapServer handles extents more inline with WMS. It's
just a matter of interpretation.
Pre-3.5 the extent was taken to mean the points at the CENTER of the UL
and LR cells in the output
map (hence the width-1). Now extent means the UL corner of the UL cell
and the LR corner of the LR
cell (hence the width). Draw yourself a picture, it helps. Unless you
were computing extents and scale
outside of MapServer (i.e. in javascript) then this change doesn't
affect you, and even if it did the 
effects are largely unnoticeable. Note that this is a 3.5+ change.

The other change is in the interpretation of the SIZE parameter in the
scalebar section. In the past that
was just a rough estimate of witdh (height is always predictable). The
actual width value would vary 
depending on some math. That sucked because you couldn't do things like
scalebar rollovers cause netscape 
would reserve on the original size of the image. So, in 3.4+ when you
say SIZE 300 4 you get a 300 pixel
wide scalebar, again height is always fixed and constant. In practice
you need to make your scalebars just
a bit larger and then I've seen no problems. Note this is a 3.4+
change.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> <imap at chesapeake.net> 03/11/02 11:52AM >>>
An anomoly with scale when upgrading from mapserv3.217 to mapserv3.5.
This info reported by one of my users.  If anyone has any ideas,
please
share nfo.  Thanks...

>         We are investigating an anomaly we can not explain when
updating 
> to mapserv3.5.  The scale bar that is drawn under the main window
has
> changed it's idea of how big things are.  That is, with the old
> mapserver it started out at full view showing each section as 460
miles
> with the full scale showing 2300 miles.  The new mapserver causes it
to
> show each section as 400 miles up to 2000 for the whole scale.  Old
setup,
> sections are 44mi with full scale of 220, and new setup sections are
> 39mi full scale of 195.  I'm concerned that either distance in the
new
> map server is wrong, or we had been showing it wrong for a long
time.

I've looked at the sources, and the only thing I saw was the
computation
used image (width-1) in the old, and the new source computes with
(width).
I am not sure which one is correct/accurate.

Regards,

Chris Stuber (mapsurfer)
Silicon Mapping Solutions, Inc



More information about the MapServer-users mailing list