GRIDS and Graticule
Jeff de La Beaujardiere
jeff2005 at SVS.GSFC.NASA.GOV
Fri Jul 8 05:52:07 PDT 2005
François TOURDE wrote:
> It seems that the {MIN|MAX}{ARCS|INTERVALS|SUBDIVIDE} parameters
> doesn't works correctly on my .map file.
I finally figured out how to configure this properly: instead of trying
a combination of several of these parameters, use only the ONE parameter
that produces the desired effect. For example, if you want a fixed grid
at some interval, then specify MININTERVAL. If you want a reasonable
number of lines no matter what the zoom, specify MINARCS. (I have found
that 'MINARCS 5' and 'LABELFORMAT DDMM' gives good results for
geographic coordinates.
If you look in the source code mapfile.c, the function loadGrid has a
switch statement such that only the first matching directive is used.
They appear in this order:
MINARCS
MAXARCS
MININTERVAL
MAXINTERVAL
MINSUBDIVIDE
MAXSUBDIVIDE
The documentation at
http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#grid should be
corrected because it gives a false impression. It should say something
like this:
<quote>
The number of arcs to draw is controlled by any ONE of the following
parameters. Mapserver will inspect the GRID object and search for these
parameters in this order and will obey the first one it finds:
MINARCS [double]
The minimum number of arcs to draw in the bounding box.
MAXARCS [double]
The maximum number of arcs to draw in the bounding box. [NOT TESTED]
MININTERVAL [double]
The interval between gridlines, independent of bounding box size.
MAXINTERVAL [double]
The interval between gridlines, independent of bounding box size.
No discernible difference between MININTERVAL and MAXINTERVAL.
MINSUBDIVIDE [double]
The minimum number of segments to use when rendering an arc. [NOT
TESTED]
MAXSUBDIVIDE [double]
The maximum number of segments to use when rendering an arc. [NOT
TESTED]
</quote>
-Jeff DLB
More information about the MapServer-users
mailing list