[mapserver-users] featurequery, TOLERANCE 0, find adjacent polygons?

Steve Lime Steve.Lime at dnr.state.mn.us
Mon Nov 9 15:23:17 EST 2009


Hi Ted: To answer your questions...

1) Yes, I believe so. Shapes that share an edge have a distance between
them of 0 and are considered to intersect. MapServer doesn't have a means 
to easily detect adjacency as things sit now.

2) No, the code skips A if A is the selection layer. You could duplicate that layer
in your mapfile though to get around that.

Steve

>>> On 11/4/2009 at 10:31 AM, in message
<1257352274593-3946385.post at n2.nabble.com>, Ted Spradley
<tspradley at snoogems.com> wrote:

> Hi,
> 
> I want the user to select a polygon from the map, then return a hilited map
> of the selected polygon as well as the adjacent polygons along with a list
> of the names of each polygon.
> 
> I have all of the parts of my desired query functioning independently, but
> not all in concert.
> 
> 
> 
>> featurequery: (layer A *must* be a polygon layer, version 5.4 supports
>> LINE layers as well)
>>   - find the first geometry that intersects point x,y in layer A and use
>> it to select geometries that intersect it in layer B
>>   - find the first geometry that intersects point x,y in layer A and use
>> it to select geometries that intersect it in all other layers
>> 
> 
> Two questions:
> 1. With mode=featurequery, does setting TOLERANCE 0 in polygon layer B
> return the adjacent polygons
>     to the polygon return from layer A?
> 2. If I make a "mode=featurequery" with an img.x & img.y against a polygon
> layer slayer=A, if I also specify qlayer=A will MapServer query layer A
> first to find the polygon containing the point, then query layer A again to
> find the intersecting (adjacent) polygons?
> 
> Thanks,
> Ted S.



More information about the mapserver-users mailing list