[Mapserver-users] Displaying Lat-Long grids in the map image?
Jan Hartmann
jhart at frw.uva.nl
Mon Mar 24 04:22:43 PST 2003
John,
Am I right that labels have to be provided? When I try to draw the grid
layer without a LABEL, MapServer crashes. With labels it runs OK,
although it takes plenty of time, much more than when displaying a grid
based on a shapefile layer.
Jan
Administrator wrote:
> Francisco,
>
> A GRID keyword has been added to LAYER in Mapserver 3.7 that provides
> the functionality you're looking for. Here's an example:
>
> LAYER
> NAME "GRID"
> PROJECTION
> "proj=latlong"
> "ellps=WGS84"
> "datum=WGS84"
> END
> TYPE LINE
> STATUS DEFAULT
> CLASS
> COLOR 0 255 128
> LABEL
> TYPE BITMAP
> SIZE MEDIUM
> COLOR 255 128 89
> END
> END
> GRID
> MININTERVAL 0.10
> MAXINTERVAL 0.10
> # INTERVALCOUNT 10
> # MINARCS 16
> # MAXARCS 16
> LABELFORMAT "DDMMSS"
> END
> END
>
> This will render a grid in Lat-Long with one tenth degree spacing and
> degree minute second labels. For variable spacing, remove the min, max
> interval tags.
>
> To allow Mapserver to pick defaults for the grid, simply specify
>
> GRID
> END
>
> in your layer.
>
> Regards,
>
> John Novak
> Novacell Technologies
> www.novacell.com <http://www.novacell.com>
>
> -----Original Message-----
> *From:* Francisco Delgado [mailto:fdelgado at snet.gob.sv]
> *Sent:* Thursday, March 20, 2003 7:20 AM
> *To:* mapserver-users at lists.gis.umn.edu
> *Subject:* [Mapserver-users] Displaying Lat-Long grids in the map image?
>
> Hello everybody.
>
> I want to set up my maps to show the Lat-Long (UTM or whatever)
> grids. I got the idea that there is no way to add them as a property
> of the map file, am I right? In that case, does someone has a clever
> idea to do this? I made a shapefile with the gridlines cathegorized
> to show different densities of gridlines at different scale levels,
> but I guess that there must be much more elegant alternatives.
>
> Thank you all.
>
> ---------------------------------
> Francisco Delgado
> Informatica - SNET
> http://www.snet.gob.sv
More information about the MapServer-users
mailing list