GRIDS and Graticule

Brent Fraser bfraser at GEOANALYTIC.COM
Tue Jun 28 13:19:21 PDT 2005


François,

  I think the MIN/MAXARCS parameter values in the map file are just "hints"
for the grid/graticule portion of mapserver, it will show a few more or less
lines to ensure the lines are drawn at "good" intervals.  Using a value of
MAXARCS 5 and zooming in and out, I get from 3 to 9 lines.

Here's an example of a grid layer for the Itasca demo/workshop:

   LAYER
     NAME "grid"
     METADATA
       "DESCRIPTION" "Grid"
     END
     TYPE LINE
     STATUS ON
     CLASS
       NAME "Graticule"
       COLOR 150 150 150
       LABEL
         COLOR  150 150 150
#         FONT arial
         TYPE bitmap
         SIZE medium
         POSITION AUTO
         PARTIALS FALSE
         BUFFER 5
         OUTLINECOLOR 255 255 255
       END
    END
#    PROJECTION
#        "init=epsg:4269"
#    END
    GRID
#      LABELFORMAT "%g°"
#      MAXARCS 5
      LABELFORMAT "%7.0f m"  # show UTM coords
      MININTERVAL 20000  # fixed grid no matter what the scale
    END
  END # Layer


If you want show a Decimal Degree graticule, change it to:

    PROJECTION
        "init=epsg:4269"
    END
    GRID
      LABELFORMAT "%g°"
      MAXARCS 5
#      LABELFORMAT "%7.0f m"  # show UTM coords
#      MININTERVAL 20000  # fixed grid no matter what the scale


Brent Fraser


----- Original Message ----- 
From: "François TOURDE" <fr-ms at TOURDE.ORG>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Tuesday, June 28, 2005 11:33 AM
Subject: Re: [UMN_MAPSERVER-USERS] GRIDS and Graticule


> Le 12962ième jour après Epoch,
> Brent Fraser écrivait:
>
> > François,
> >
> >   Here's the documentation explanation, along with some of my notes on
the
> > parameters:
>
> Many thanks for your reply.
>
> > MINARCS [double]
> > The minimum number of arcs to draw.
> > The minimum number of graticule lines to draw on the map.  Use this
> > parameter to get more lines.
> >
> > MAXARCS [double]
> > The maximum number of arcs to draw.
> > The maximum number of graticule lines to draw on the map.  Use this
> > parameter to get fewer lines.
>
> Thanks for the explanation. Unfortunately it is what I have
> understood. And it doesn't works for me.
>
> When I use "MAXARCS 10" for example, and zooming out on the map, there
> is lot (more than 10) graticule lines.
>
> I use MAPSERVER V4.4.1 (stock Debian packets)
>
> > MININTERVAL [double]
> [...]
> > MAXINTERVAL [double]
>
> Idem.
>
> > MINSUBDIVIDE [double]
> > MAXSUBDIVIDE [double]
>
> Not yet used... I'm waiting for previous parms to work. ;)
>
> -- 
> Your aims are high, and you are capable of much.



More information about the MapServer-users mailing list