Hi,

How about doing two WFS requests in a row? In pseudo SQL

1) select geometry from town_polygons where town='my_town'
2) capture the geometry from the previous and use in the WFS Intersects filter
   select * from my_features where [attribute filter] AND [Intersects filter 
with selected_town_polygon]

I know it is doable, we use that in some OpenLayers applications just like you 
plan. User can draw a polygon or select a region name from a drop down menu 
which makes the application to do the first WFS query automatically.

-Jukka Rahkonen-

________________________________
Bistrais, Bob wrote:

> Interesting thought.  Bbox won’t quite do it- the spatial select would be 
> based on, for instance, a selected > county or town, or a user-defined 
> polygon.

From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us]
Sent: Friday, February 08, 2013 11:05 AM
To: Bistrais, Bob; mapserver-users@lists.osgeo.org
Subject: RE: Combined spatial and attribute query

Is your spatial query just a bbox? If so then just set that as your map extent 
as part of doing your attribute query (attributes always do both). There are 
other options too, let us know more what your spatial query is.

Steve
________________________________
From: 
mapserver-users-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org>
 [mapserver-users-boun...@lists.osgeo.org] on behalf of Bistrais, Bob 
[bob.bistr...@maine.gov]
Sent: Friday, February 08, 2013 10:01 AM
To: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Subject: [mapserver-users] Combined spatial and attribute query
Does anyone have advice on the best or most efficient way to query data, 
involving both a spatial and an attribute query.  I need to query several 
layers, selecting based on an area, then select from that selection based on an 
attribute value.  It would be OK to query by the attribute first, then spatial.
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to