how to make a graticule layer ...

Brent Fraser bfraser at GEOANALYTIC.COM
Thu Dec 15 14:33:34 PST 2005


Jeremy,

  Here's a map file I was using for some graticule testing a while back.  I
think it should work with 4.6.1 shp2img (and hopefully mapserv), or at least
show lines and labels (just not where you'd expect):
----------------------------------------------
MAP
NAME test
STATUS ON
SIZE 600 600
EXTENT -1000000 -1100000 900000 1000000
UNITS meters
IMAGECOLOR 255 255 255
OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGB
END
PROJECTION
    "proj=stere"
    "ellps=WGS84"
    "datum=WGS84"
    "lat_0=90"
    "lat_ts=67.5"
    "lon_0=-155"
    "units=m"
END
LAYER
  NAME "GRID"
  TRANSPARENCY 30
  PROJECTION
    "proj=latlong"
    "datum=WGS84"
  END
  TYPE LINE
  STATUS default
  CLASS
        COLOR 0 0 0
        LABEL
              TYPE BITMAP
              SIZE MEDIUM
              COLOR 0 0 0
              OUTLINECOLOR 255 255 255
        END
  END
  GRID
        LABELFORMAT "DDMM"
#    MINSUBDIVIDE 6
#    MAXSUBDIVIDE 2
    MININTERVAL 10
#    MAXINTERVAL 10.0
#    MINARCS 16
#    MAXARCS 100
  END
END
END
------------------------------------------

Brent Fraser


----- Original Message ----- 
From: "Sears, Jeremy" <Jeremy.Sears at CCRS.NRCAN.GC.CA>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Thursday, December 15, 2005 3:02 PM
Subject: [UMN_MAPSERVER-USERS] how to make a graticule layer ...


> Hi All,
> Im wondering if anyone could point me in the direction of some
documentation
> outlining how to create a graticule.
>
> I grabbed the following code from the archive, however after adding it to
a
> .map file, Mapserver hangs. That is to say Mapserver becomes unresponsive.
>
> Any Suggestions?
>
> Thanks
> Jeremy
>
> ######################################
> #  GRID
> #
> LAYER
>   NAME "Grid"
>   TYPE LINE
>   STATUS DEFAULT
>   CLASS
>     NAME "Graticule"
>     COLOR 0 0 0
>     LABEL
>       COLOR 255 0 0
>       FONT "arial"
>       TYPE truetype
>       SIZE 8
>       POSITION auto
>       PARTIALS false
>       BUFFER 5
>       OUTLINECOLOR 255 255 255
>     END
>   END
>
>   GRID
>     LABELFORMAT DDMM
>     MAXARCS 10
>     MINARCS 2
>     MAXINTERVAL 20
>     MININTERVAL 10
>     MAXSUBDIVIDE 40
>     MINSUBDIVIDE 2
>   END
> END



More information about the MapServer-users mailing list