Scalebar Intervals - Defining Numeric Values

Fawcett, David David.Fawcett at STATE.MN.US
Wed May 4 10:06:41 EDT 2005


Matthew, 

I may be oversimplifying this.  Will your map always be of the same piece of the earth, or of a limited number of locations.  If the map is of fixed scale and extent, couldn't you just create your own fixed scale bar image using Gimp and then just place it on your page as an image?  

David.

David Fawcett
Minnesota Office of Environmental Assistance
david.fawcett at moea.state.mn.us
651.215.0200


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Paul Spencer
Sent: Wednesday, May 04, 2005 5:57 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Scalebar Intervals - Defining Numeric
Values


Matthew,

your assessment is correct, you cannot affect the values that mapserver
decides to use for a scale bar.  There is a good reason for this.  At
your particular scale, it may not be possible to use an integral number
of pixels to represent 100km (or some sub-division of that).  Also,
MapServer does make the scale bar fit the requested size (including the
labels) so you could try reducing the width in small increments to see
if you can get a different result.

Cheers

Paul

Matthew Smith wrote:
> Hi
>
> I am creating a map of fixed extent and scale (layers can be turned on and
> off).  How can I create a scalebar of a fixed length - in km rather than
> pixels?  I want to draw a scalebar 100km long; the one created automatically
> is 128km long and divided 32,64,96,128km.  This will probably look weird to
> those who are either expecing 10s or at least 25,50,75...
>
>>From the documentation
> (http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#scalebar) I can't
> see any way to do this.
>
> Current config below.
>
> Cheers
>
> M
>
> SCALEBAR
>   IMAGECOLOR 255 255 255
>   LABEL
>     COLOR 0 0 0
>     SIZE large
>   END
>   outlinecolor 0 0 0
>   STYLE 1
>   SIZE 450 05
>   COLOR 255 255 255
>   UNITS kilometers
>   INTERVALS 4
>   STATUS on
> END
>

--
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+



More information about the mapserver-users mailing list