[Mapserver-dev] shpxy documentation
Steve Lime
steve.lime at dnr.state.mn.us
Fri Oct 1 01:39:55 EDT 2004
> Steve,
> is there any documentation on [shpxy]? I've looked at the source but
> some things are not obvious to me. Specifically what I am looking for
> is information about the following:
What's on the WIKI is the best around. I know there was a bug filed
today
to remedy that.
> ph,pf - part header, part footer - what is a part? In a multi-ring
> polygon, would this be each ring?
A part is an element of a multipart feature, just like you mention.
> I am trying to turn polygons from a query into something to use in
> searching a postgis database so I am doing something like:
> [shpxy yf=","]
> to produce a list of comma separated coords (that are internally space
> separated):
> x1 y1,x2 y2,x3 y3,
> but I always end up with an extra , at the end. Is it possible to
> optionally avoid footers on the last element processed (or optionally
> avoid headers on the first one)?
There's actually a TODO note in the code about this. What we need is a
coordinate seperator. I've gone back and forth about how much control
is really necessary. Overkill is probably ok until we see how folks
might
use this tag.
So, I just added a new parameter called cs (coordinate seperator) to
the tag code. It's default value is a comma. It's a true seperator and
only
appears between coordinates. I also added a part seperator (ps) too. A
shape seperator isn't possible within the tag because it's shape
specific.
So, the default presentation is:
[shpxy] = x1 y1,x2 y2,x3 y3
and
[shpxy xh="(" yf=")"] gives us (x1 y1),(x2 y2),(x3 y3)
I think this should address the problems you're having. The new
attributes
are part of CVS HEAD now.
Steve
More information about the mapserver-dev
mailing list