FEATUREQUERY to find where a line and polygon intersect
Steve Lime
steve.lime at DNR.STATE.MN.US
Fri Oct 28 13:46:36 PDT 2005
Rick: The featurequery modes require a polygon layer as input. The code
could easily extended to work from lines but I've not taken the time to make
that happen. Assuming you're extracting the linear feature from a dataset
(e.g. a shapefile) then a featurequery is what you want. If you want to use
an adhoc line then you'd want to do an nquery with either the imgshape or
mapshape parameters holding the line.
Sounds like test you're doing should work. I use feature queries all the time.
What type of feedback from the software are you getting when you try
your tests?
Steve
>>> Rick S <rstoyle at COMCAST.NET> 10/28/05 12:19 PM >>>
I am using the Mapserver CGI.
My goal is to determine all the polygons in LAYER_A that a line passes
through. Currently, I have an application that will successfully return
the polygon(s) that a specific point is in (using MODE=NQUERY). Now I want
to take it to the next step and use a multi-segment line instead of a
single point.
I have been trying to do this using the FEATUREQUERY and FEATURENQUERY
modes that use an SLAYER (Type POLYGON) with a single FEATURE object that
contains the points that make up the line (arranged as a closed polygon).
I haven't been having much luck getting the FEATUREQUERY to work though.
Before I spend more time with this, can anyone tell me if I am heading
down the right path? Is there an easier way?
More information about the MapServer-users
mailing list