I want to use ogrinfo to get features from a WFS within a bounding box. I know I can use the "-spat minx miny maxx maxy" parameter for this, but it does not work. Here's what works, what not, and what I do not understand from the response that is sent back:
> ogrinfo -ro WFS:https://viewer.image-v.be/MM_Opnameposities MM_AGIV_MR__1returns:
INFO: Open of `WFS:https://viewer.image-v.be/MM_Opnameposities' using driver `WFS' successful.Layer name: orbit:MM_AGIV_MR__1Geometry: PointFeature Count: 10000Extent: (-530060.03, -6145691.18) - (124305.92, 155628.92)Layer SRS WKT
ROJCS[..., AUTHORITY["EPSG","31370"]]gml_id: String (0.0)OrbitPhotoId: String (0.0)OrbitTimestamp: String (0.0)OGRFeature(orbit:MM_AGIV_MR__1):0 gml_id (String) = 1956101721 OrbitPhotoId (String) = IMAGE-V_03_20150612_04_000000 OrbitTimestamp (String) = 0 POINT (-530060.03185588738 -6145691.181999105 0)...(9999 more features)I understand this: the WFS contains millions of point features, but limits its response to 10000 features (the number indicated after "Feature Count" and the number of features returned).
> ogrinfo -ro WFS:https://viewer.image-v.be/MM_Opnameposities MM_AGIV_MR__1 -where "OrbitPhotoId = '06224437'"returns
INFO: Open of `WFS:https://viewer.image-v.be/MM_Opnameposities' using driver `WFS' successful.Layer name: orbit:MM_AGIV_MR__1Geometry: PointFeature Count: 10000Extent: (116998.17, 155411.48) - (116998.17, 155411.48)Layer SRS WKT
ROJCS[..., AUTHORITY["EPSG","31370"]]gml_id: String (0.0)OrbitPhotoId: String (0.0)OrbitTimestamp: String (0.0)OGRFeature(orbit:MM_AGIV_MR__1):1474 gml_id (String) = 166716417 OrbitPhotoId (String) = 06224437 OrbitTimestamp (String) = 2009-09-02 09:16:41 POINT (116998.17 155411.48 53.67)"Feature Count" is still 10000 although my request is for one particular feature. Only that feature is sent back. So "Feature Count", what does it mean? The number of features offered by the WFS (here, should be 'millions'), the maximum number of features returned by the WFS (here 10000, ok) or the actual number of features returned by the WFS (here, should be 1)
Then this request having a filter by bounding box (spatial extent):
> ogrinfo -ro WFS:https://viewer.image-v.be/MM_Opnameposities MM_AGIV_MR__1 -spat 122700 154500 122900 154700returns
INFO: Open of `WFS:https://viewer.image-v.be/MM_Opnameposities' using driver `WFS' successful.Layer name: orbit:MM_AGIV_MR__1Geometry: PointFeature Count: 0Layer SRS WKT
ROJCS[..., AUTHORITY["EPSG","31370"]]gml_id: String (0.0)OrbitPhotoId: String (0.0)OrbitTimestamp: String (0.0)How come nothing is returned? There are many point features in that spatial extent. The spat coordinates are given in the default CRS of the WFS (i.e. EPSG:31370). I understand "Feature Count" is 0 if nothing is returned, but why then is the feature count not 1 but 10000 in my second case? This makes no sense to me.
Can someone explain this behaviour?
Thanks.
أكثر...
> ogrinfo -ro WFS:https://viewer.image-v.be/MM_Opnameposities MM_AGIV_MR__1returns:
INFO: Open of `WFS:https://viewer.image-v.be/MM_Opnameposities' using driver `WFS' successful.Layer name: orbit:MM_AGIV_MR__1Geometry: PointFeature Count: 10000Extent: (-530060.03, -6145691.18) - (124305.92, 155628.92)Layer SRS WKT
> ogrinfo -ro WFS:https://viewer.image-v.be/MM_Opnameposities MM_AGIV_MR__1 -where "OrbitPhotoId = '06224437'"returns
INFO: Open of `WFS:https://viewer.image-v.be/MM_Opnameposities' using driver `WFS' successful.Layer name: orbit:MM_AGIV_MR__1Geometry: PointFeature Count: 10000Extent: (116998.17, 155411.48) - (116998.17, 155411.48)Layer SRS WKT
Then this request having a filter by bounding box (spatial extent):
> ogrinfo -ro WFS:https://viewer.image-v.be/MM_Opnameposities MM_AGIV_MR__1 -spat 122700 154500 122900 154700returns
INFO: Open of `WFS:https://viewer.image-v.be/MM_Opnameposities' using driver `WFS' successful.Layer name: orbit:MM_AGIV_MR__1Geometry: PointFeature Count: 0Layer SRS WKT
Can someone explain this behaviour?
Thanks.
أكثر...