[mapserver-users] Creating an abutter's list (was: Accessing Vertices of a Shape - PHP MapScript)

Mark Phillips mbp at geomtech.com
Tue Nov 19 13:09:44 EST 2002


> ...
> The best would be if we could create a new shape that is the parcel of
> interest with a buffer added around it and use that buffered parcel in a
> queryByShape().  Unfortunately for you there is no way to create such a
> vector buffer in MapServer.
> 
> Another trick could be to sample points every few meters along the
> border of the parcel of interest and do a point query at every step with
> a tolerance of half the distance between the sampled points.  You would
> ...

Although both of these methods would probably work in most cases, it
seems to me that in both cases if there are parcels that are close to
but don't actually touch your given parcel, the algorithm could
falsely include them in the result.  With a judicious choice of buffer
size or sample point density you could minimize the chances of this
happening in practice, but it seems to me that the best solution would
be to do an actual search through the shapefile for parcels that share
an edge with the given one.

In fact, this computation could be done once for the whole shapefile,
producing a parcel adjacency graph that could be stored along with
the shapefile and used for lightening fast adjacency lookups.

Of course I'm speaking in pure algorithmic terms here, with no regard
to what might be possible with existing functions in mapserver /
mapscript, and I realize that part of the point is to find a way to do
it with existing functions.  If there is a way to do it with existing
functions that is easy and fast and works in all practical cases,
then perhaps there's no need to implement a new algorithm.

If the new algorithm seems like a good idea, however, I could be
interested in working on it.  I've been playing with mapserver,
shapelib, etc and would welcome a project that would give me a chance
to dive in deeper.  I also have a particular interest in municipal
applications.  [I imagine this function could be in a shared library
that could be optionally loaded into mapscript applications, so as to
avoid bloating the actual mapscript code itself.]

Before diving in, however, I'd like to ask whether this sounds like a
reasonable solution.  Is there a better way?  Are there hurdles or
other problems with what I'm suggesting that I've overlooked?

--Mark

Mark Phillips @ Geometry Technologies LLC
P.O. Box 1170
Black Mountain, NC  28711
828-664-1748
mbp at geomtech.com  http://www.geomtech.com



More information about the mapserver-users mailing list