Filter with FeatureId

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Filter with FeatureId

Steffen G
I not sure it is a my mistake or a error in OL 2.12:

I use the filter like:
new OpenLayers.Filter.FeatureId({
  fids: ["st.3005","st.9504","st.21846"]
})

This produced a request-body:
...<ogc:And><ogc:FeatureId fid="st.3005"/><ogc:FeatureId fid="st.9504"/><ogc:FeatureId fid="st.21846"/><ogc:BBOX><ogc:PropertyName>sp_geometry</ogc:PropertyName><gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:coordinates decimal="." cs="," ts=" ">14.159328104722,51.400626869388 14.395019175278,51.4452635058</gml:coordinates></gml:Box></ogc:BBOX></ogc:And>...

The reponse-body is empty (because the featureIDs are connected with AND?)

If I insert a OR-Tag by hand in the request everything works well:
...<ogc:And><ogc:Or><ogc:FeatureId fid="st.3005"/><ogc:FeatureId fid="st.9504"/><ogc:FeatureId fid="st.21846"/></ogc:Or><ogc:BBOX><ogc:PropertyName>sp_geometry</ogc:PropertyName><gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:coordinates decimal="." cs="," ts=" ">14.159328104722,51.400626869388 14.395019175278,51.4452635058</gml:coordinates></gml:Box></ogc:BBOX></ogc:And>...

What's wrong with my filter?
 
Reply | Threaded
Open this post in threaded view
|

Re: Filter with FeatureId

Andreas Hocevar-2
There is nothing wrong with OpenLayers. The AND filter combines the feature ids with a bounding box filter. And none of the feature ids you are looking for is inside the bounding box.

Andreas.


On Thu, Apr 25, 2013 at 1:04 AM, neffets <[hidden email]> wrote:
I not sure it is a my mistake or a error in OL 2.12:

I use the filter like:
new OpenLayers.Filter.FeatureId({
  fids: ["st.3005","st.9504","st.21846"]
})

This produced a request-body:
...<ogc:And><ogc:FeatureId fid="st.3005"/><ogc:FeatureId
fid="st.9504"/><ogc:FeatureId
fid="st.21846"/><ogc:BBOX><ogc:PropertyName>sp_geometry</ogc:PropertyName><gml:Box
xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:coordinates
decimal="." cs="," ts=" ">14.159328104722,51.400626869388
14.395019175278,51.4452635058</gml:coordinates></gml:Box></ogc:BBOX></ogc:And>...

The reponse-body is empty (because the featureIDs are connected with AND?)

If I insert a OR-Tag by hand in the request everything works well:
...<ogc:And>*<ogc:Or>*<ogc:FeatureId fid="st.3005"/><ogc:FeatureId
fid="st.9504"/><ogc:FeatureId
fid="st.21846"/>*</ogc:Or>*<ogc:BBOX><ogc:PropertyName>sp_geometry</ogc:PropertyName><gml:Box
xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:coordinates
decimal="." cs="," ts=" ">14.159328104722,51.400626869388
14.395019175278,51.4452635058</gml:coordinates></gml:Box></ogc:BBOX></ogc:And>...

What's wrong with my filter?





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Filter-with-FeatureId-tp5049516.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users



--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users