Scalebar question

Ed McNierney ed at TOPOZONE.COM
Thu Sep 9 04:55:11 PDT 2004


Stéphane -

The scale units of any map depend entirely on the projection you use.  It is not possible to create a scale bar in kilometers for a map in latlong projection, because the scale of that map is not consistent in km - that is, a line one km long is a different length depending on where you are on that map.

I feel pretty strongly that the "latlong" projection is overused because it is "simple".  Different map projections have different properties, and if you want to be able to measure distances you should choose one of the projections that allows you do to that accurately.  You simply cannot do it with latlong projection.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 978 251-4242   Fax: +1 978 251-1396 
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Stéphane RIFF
Sent: Thursday, September 09, 2004 6:12 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Scalebar question

Hi,

I have a question about scalebar calculation.
I wrote a map application which is in latlong projection (wgs84) and mapserver is able to calculate a scale in KM unit, so i would like to know how mapserver can do this ???
Does he reproject some points ?
Does the result completly wrong ?

Here is a part of the mapfile :

MAP
    NAME CRN
    STATUS ON
    EXTENT -8.520387 21.998300 12.396365 38.845093
    SIZE 600 600
    IMAGECOLOR 255 255 255
    UNITS DD
    IMAGETYPE PNG
    PROJECTION
      "init=epsg:4326"
    END

    SCALEBAR
        IMAGECOLOR 255 255 255
        LABEL
          COLOR 0 0 255
          SIZE tiny
        END
    STYLE 1
    SIZE 200 2
    COLOR 0 0 255
    UNITS KILOMETERS
    INTERVALS 4
    TRANSPARENT FALSE
    STATUS EMBED
    POSITION LR
    END
END

Maybe i'm completly wrong and this sort of thing isn't realizable but i want to know what do you think about that.

Thanks



More information about the MapServer-users mailing list