Changes between Initial Version and Version 1 of MapServerGrid


Ignore:
Timestamp:
Jan 27, 2009, 10:08:16 AM (15 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapServerGrid

    v1 v1  
     1= GRID Object Use in a Mapfile =
     2
     3And here's the new GRID keyword documentation:
     4
     5The layer definition
     6{{{
     7LAYER
     8
     9  NAME "SAMPLE GRID"
     10  PROJECTION
     11          "proj=latlong"
     12          "ellps=WGS84"
     13          "datum=WGS84"
     14  END
     15  TYPE LINE
     16  STATUS DEFAULT
     17  CLASS
     18        COLOR 0 255 128
     19          LABEL
     20                TYPE BITMAP
     21                SIZE MEDIUM
     22                COLOR 255 128 89
     23          END
     24  END
     25
     26  GRID
     27  END
     28
     29END
     30}}}
     31Will generate a graticule with default arc spacing, arc color RGB 0 255 128 and labeled in decimal degrees with color RGB 255 128 89. Labels will appear at all four of the image edges.
     32
     33Each arc in the resulting grid is composed of 256 line segments. To render grid arcs with a different number of segments, use the MINSUBDIVIDE and MAXSUBDIVIDE keywords. Setting MINSUBDIVIDE == MAXSUBDIVIDE will always yield exactly the number of segments specified.
     34
     35To set the format of the grid labels, specify a printf style format string after the LABELFORMAT keyword. The default string is "%5.2f". To get DMS labeling, enter "DDMMSS" as the LABELFORMAT string used by the GRID, and for DM labeling, specify "DDMM".
     36
     37The GRID feature
     38{{{
     39 GRID
     40          MINSUBDIVIDE 64
     41          MAXSUBDIVIDE 64
     42          LABELFORMAT "DDMMSS" 
     43 END
     44}}}
     45Yields a grid with 64 segments in every arc labeled with degrees, minutes and seconds.
     46
     47Other keywords behave similarly:
     48
     49MININTERVAL and MAXINTERVAL allow a range to be set for grid spacing. The interval is specified in the coordinate system of the grid. Since PROJECTION is supported, if your mapserver has PROJ4, the grid may be in any coordinate system supported by PROJ4, and will be projected into the coordinate system of the generated image.
     50
     51MINARCS and MAXARCS are hints to the code that generates grid intervals regarding when to stop subdividing the range of an axis. The subdivider will try to honor the range specified, or the min/max id only one keyword is present.
     52
     53Please let me know if there are bugs, questions or comments.
     54
     55Regards,
     56
     57John Novak Novacell Technologies www.novacell.com