[mapserver-users] GRID labeling, OK, where are the MapServerGRID guru's??
Brent Fraser
bfraser at geoanalytic.com
Wed Mar 19 10:23:21 PDT 2008
Bob,
See my comments below...
Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta
----- Original Message -----
From: "Bob Basques" <bob.b at gritechnologies.com>
Cc: <mapserver-users at lists.osgeo.org>
Sent: Wednesday, March 19, 2008 8:56 AM
Subject: Re: [mapserver-users] GRID labeling, OK, where are
the MapServerGRID guru's??
> Brent,
>
> Thanks for these notes, exactly the type of stuff we're
looking for. I
> do remember your thread on the graticules BTW. :c)
This is also
> something of interest to me. The big picture plan is to
allow a user
> to ultimately plot/print a USNG encoded map per their
specification.
There will be a few speed bumps with using Mapserver:
- memory limitation due to mapserver creating at least
two copies of the output graphic in memory ( 34in wide x
44in long at 600 dpi is a huge raster!). That may have
changed with the adoption of AGG, but I haven't looked into
it.
- PDF output in mapserver was (still is?) limited to 256
colors
- getting properly scaled output required careful
calculation of extents/graphics size.
- and of course the grid/graticule issues
> There are certainly a lot of other uses for the same sort
of labeling
> (that I can also use). I'm trying to organize the adds to
MapServer so
> they are reuseable, or at least set up things so the
different types of
> labeling are possible with as little additional coding
effort as possible.
That may be tough. It depends on how picky you are on your
label placement. If your map will not be rotated (via the
ANGLE setting in the map file), and you will only label
projected coordinates (not the lat/lon graticule), it might
not be too bad.
>
> Your method of doing the margins from within the MapFile
is an
> interesting approach.
It's a hack, really only useful to encourage enhancement
ideas for cartographic grid/grat features.
>
> Some general questions to you (and anyone else interested
in commenting):
>
> * Do you see a need at all to display the grid labels
along only two
> edges, or even in just two axis but just once, along the
center of the
> page for example, both vertically and horizontally.
Personally I don't have the need, but it could be useful for
others...
>
> * Do you see a need to have a variable available for
setting the outside
> buffer zone area, in other words, for setting how far in
(or possibly
> out) from the edge of the map, the labels are printed?
Absolutely! Besides the need to make it visually pleasing, I
may want to label the map once with lat/lon labels close to
the neat line, then label again with UTM coordinates sightly
farther away from the neat line to avoid collision with the
lat/lon labels ( or label in the adjacent zone coordinates,
etc). And don't get me started on Township/Range labels!
>
> * Do you see a need to have the GRID displayed as a TICed
grid instead
> of continuous lines, I'm not sure how to actually do this
at the moment.
> Might be a symbol placement sort of thing, with rotation
instead of line
> drawing. This is further down the list for me at this
point though.
Yes, I'd like to be able to specify tics instead of lines.
You could do it by using symbols with a pre-constructed
point shapefile. The problem is you have to contruct it
prior to having Mapserver generate the output graphic.
This is the problem I have with the "just use a shapefile to
display a grid/grat" approach. It's ok if your map site has
a limited geographic scope, scale range, coord system
choice, etc. And it's ok if you are doing "off-line"
automated mapping (i.e. not interactive web mapping).
>
> * Lastly, do you see a need for an entirely different
approach to some
> of these labeling/printing aspects, I've been toying with
the idea (for
> a couple of years now) of building a completely separate
service that
> can still be complimentary to MapServer and be programmed
against in the
> same manner from the client side, for templating a print
function. The
> basic idea would be to build a system where there is a
layout canvas on
> the client end, that can use URL resources as print
objects, and allows
> the user to layout where everything goes on a page, which
most likely is
> some sort of template for printing in pre-defined ways.
Mapserver would
> handle all the inclusive map grid line markup, but the
real detailed
> labeling could happen with this separate facility,
specifically for
> printing.
>
This is the conclusion that Landon Blake and I came to in
the thread previously mentioned. If your intent is to do
off-line automated mapping then a graphic layout tool (with
some mapping smarts) would give you the flexibility and
precision needed. A GUI front end with a batch capability
would be the ultimate!
That being said, I think there is a need (or a least a
desire on my part) to improve the grid/grat capabilities in
Mapserver, as least a little:
1. Add a MARGIN object to provide a white space around the
perimeter (and prevent spurious labels). I'm not clear on
how that would affect query results, etc.
2. Improve the label placement calculation, possibly add GAP
value to map file (to replace the "15" in my mapgraticule.c)
3. Add other things like tics, expand formatting (e.g. for
NG)
> In the end, I think this labeling and grid stuff may push
me over the
> edge as far as trying out some stuff of our own. I would
imagine that
> we would start with some of the MapServ code to experiment
with. I
> think our end result might be too heavy to include in
mapserv in
> general. This GRID stuff though, has elements in both
the direct
> mapping as well as Print only aspects.
I would look to including some/most of the grid/grat
functionality in Mapserver at first. Code it with a eye to
using it as well in a separate plugin later (this may not be
possible without code revisions). As you've described, the
grid/grat stuff is really only a (necessary) subset of a
layout tool/system (a far bigger problem).
>
> I've thought a lot about what should be considered a
dynamic, online
> navigation tool, vs what should be considered a "print"
setup tool.
> Many pieces cross the line, and that's where it gets murky
on how to start.
Mapserver isn't a GIS; it also isn't an automated mapping
application. It does have some functions of both those
things, and is closer to automated mapping, so I'd start
there (but not end there!).
Brent
More information about the MapServer-users
mailing list