mapserver rasters scale

Ed McNierney ed at TOPOZONE.COM
Mon Sep 6 06:56:20 PDT 2004


Stéphane -

A scale ratio like "1/25000" only makes sense if you know the exact resolution of the output device (screen or printer) in pixels per inch.  Otherwise I can just adjust the image size on my monitor and the scale ratio won't be correct!

I suspect that you are simply seeing a difference between the output resolution MapServer uses by default (72 DPI) and the output resolution GIMP is using.  MapServer's default isn't a good guess for most monitors these days, which most users seem to run at 90 - 110 DPI.  You can use the RESOLUTION statement in your MAP file to adjust the default.

        - 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: Monday, September 06, 2004 4:58 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] mapserver rasters scale

Hi all,

I want to display some rasters layers :
       first one is 1/250000, 250 dpi
       second one is 1/25000, 250 dpi

Here is an extract of my map file :
    MAP
       UNITS METERS

       IMAGETYPE PNG

        PROJECTION
          "init=esri:27582"
        END

    LAYER
      NAME "250000"
      TILEINDEX "../data/250000"
      TILEITEM "LOCATION"
      TYPE RASTER
      STATUS ON
      OFFSITE 0 0 0
      MINSCALE 25000
      MAXSCALE 250000
      GROUP "carto"
      CLASS
        NAME "Fond raster 250000"
      END
    END

    LAYER
      NAME "25000"
      TILEINDEX "../data/25000"
      TILEITEM "LOCATION"
      TYPE RASTER
      STATUS ON
      OFFSITE 0 0 0
      MAXSCALE 25000
      GROUP "carto"
      CLASS
        NAME "Fond raster 25000"
      END
    END

This two layer switch well looking for mapserver scale.
The question i want to ask is why when i open a 1/250000 raster with GIMP and set the scale to 100%, it doesn't seem to correspond with what i see in mapserver at scale 250000.

In other words, if mapserver scale is 250000, does it means that the view is at 1/250000 sacle???

I hope my question is understandable
Thanks



More information about the MapServer-users mailing list