[Mapserver-dev] shpxy documentation
Paul Spencer
pspencer at dmsolutions.ca
Fri Sep 24 12:06:09 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:
ph,pf - part header, part footer - what is a part? In a multi-ring
polygon, would this be each ring?
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)?
After stripping the trailing comma, I turn this into a string for postgis:
"GeometryFromText( 'POLYGON((<coords>))', -1 )"
From what I understand above, though, I should be accomodating possible
situations like multi-ring polygons with
[shpxy ph="(" pf=")" yf=","]
which could produce
"GeometryFromText( 'POLYGON((<coords part 1>)(<coords part 2>))', -1 )"
which produces the problem of having the extra commas in nasty to
process places (search for ,) and replace with ) which is expensive).
Comments welcome :)
Paul
--
-----------------------------------------------------------------
|Paul Spencer pspencer at dmsolutions.ca |
|-----------------------------------------------------------------|
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
-----------------------------------------------------------------
More information about the mapserver-dev
mailing list