[mapserver-users] labeling a graticule

Brent Fraser bfraser at geoanalytic.com
Wed Jun 26 12:10:49 EDT 2002


Marc,

   I didn't try Steve's suggestion (the original labels were good enough for
that particular project), but I think it would work.  A slight modification
of his idea would be to label the graticule lines once for each side of the
map using the appropriate POSITION tag each time (and the MINDISTANCE to
prevent multiple labels).

  I did file an enhancement request (#96) regarding graticule labeling, and
sent Steve some information on ArcView's Grids and Graticules extension.

  With MapServer's raster reprojection support and the soon-to-be-completed
24-bit rendering (not to mention all the data sources it reads), MapServer
is one serious web mapping tool.  With the addition of grid/graticule
labeling, it would blow the competition (what competition?!) out of the
water!

Brent Fraser
bfraser at geoanalytic.com


----- Original Message -----
From: "Marc Jacquin" <jacquin at geosys-inc.com>
To: "Stephen Lime" <steve.lime at dnr.state.mn.us>; <bfraser at geoanalytic.com>;
<mapserver-users at lists.gis.umn.edu>
Sent: Wednesday, June 26, 2002 2:46 AM
Subject: RE: [mapserver-users] labeling a graticule


> Steve and Brent:
>
> Brent, did you try what Steve recommended ? I would like to be able to
> display tics and graticules. I guess I could do it dealing with gd but it
> would require a lot of enhancements specially because the map would be a
bit
> larger by adding a frame with an offset for some space to display the
> graticule's labels. Has anyone been working on these issues ?
>
> Thanks,
>
> Marc Jacquin
>
>
> -----Original Message-----
> From: owner-mapserver-users at lists.gis.umn.edu
> [mailto:owner-mapserver-users at lists.gis.umn.edu]On Behalf Of Stephen
> Lime
> Sent: mardi 15 janvier 2002 21:32
> To: bfraser at geoanalytic.com; mapserver-users at lists.gis.umn.edu
> Subject: Re: [mapserver-users] labeling a graticule
>
>
> One idea would be to do a bit of pre processing of the data to affect the
> order of the segments in the file. For you might bust the graticule into
two
> files, one for horizontal and one for vertical segments. Then add a new
> attribute called AVG or something and populate it with the average x or y
> coordinate (depending on orientation). Now sort the two shapefiles on that
> attribute, this will order the shapefile left to right and top to bottom
(or
> whichever direction you wish). Finally append them together (a quick
> mapscript script would work). Because of the way MapServer builds its
label
> cache the effect (I think) would be to concentrate labels along an edge of
> the map. Since your labels are popped into the cache say left to right
then
> the rightmost label would always be displayed by using the label
MINDISTANCE
> and MINFEATURESIZE options. Might be worth a try and would just require a
> couple of short mapscript scripts to build the data.
>
> As for a graticule object, I've thought about such for quite a while but
> have never got around to adding it. Could you add it to bugzilla so we
don't
> loose the idea?
>
> Steve
>
>
> Stephen Lime
> Data & Applications Manager
>
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
>
> >>> "Brent Fraser" <bfraser at geoanalytic.com> 01/11/02 02:11PM >>>
> Steve (and others),
>
>   Any thoughts on how to get perimeter labels for
> a graticule?
>
> I'd like the labels to be at the perimeter (just inside)
> of the map graphic just above (or beside) the line
> of latitude or longitude.  Right now they tend to be
> scattered through out the map (see attached gif).
>
> I've got a shapefile with line segments and the value
> of the lat/lon line as an attribute as well as a "level"
> attribute so the interval will change with the scale.
>
> Here's the portion of my map file:
>
>         LABEL
>           COLOR 255 255 0
>           TYPE TRUETYPE
>           FONT arialbd
>           SIZE 12
>           POSITION UL
>           ANGLE AUTO
>           OFFSET 4 4
>           PARTIALS FALSE
>         END # Label
>
>
>
> Of course what I'd really want is a native MapServer
> Graticule object with lots of options for line drawing
> and labelling on the outside perimeter of the map
> graphic. Maybe v3.6?
>
> Thanks!
> Brent Fraser
> bfraser at geoanalytic.com
> GeoAnalytic Inc.
> #300 , 700 - 4th Avenue SW Calgary, AB
> Canada T2P 3J4
> Tel:  (403)213-2700 Fax:  (403)213-2707
> www.geoanalytic.com
>
>
>




More information about the mapserver-users mailing list