WFS Troubleshooting – How to Troubleshoot WFS Bbox Problems Effectively

extentsgetfeaturewfs

I have trouble getting features from a WFS using a bounding box with the BBOX parameter. As soon as I specify any BBOX, the WFS returns an empty result.

Here is an example request: https://www.lfu.bayern.de/gdi/wfs/natur/schutzgebiete?service=WFS&version=2.0.0&request=GetFeature&typeName=landschaftsschutzgebiet&srs=epsg%3A25832&outputFormat=GML3&bbox=695769.22100187%2C+5312772.2889944585%2C+704904.6180023446%2C+5324801.635994857%2C+epsg%3A25832

I have seen similar questions as:

so I'm wondering if there is a general approach towards troubleshooting/debugging problems like that.

What are the steps one should follow to pinpoint the problem?

So far I have tried the following:

  1. I made sure the WFS does support the BBOX parameter by checking the capabilities.
  2. I checked the results should not be empty using QGIS.
  3. I tried to call the WFS without the bounding box to ensure it is working correctly.
  4. I checked the order of the coordinates (smaller values first).
  5. I tried different CRS constellations, e.g., specifying the bbox in epsg:4326
    https://www.lfu.bayern.de/gdi/wfs/natur/schutzgebiete?service=WFS&version=2.0.0&request=GetFeature&typeName=landschaftsschutzgebiet&srs=epsg%3A25832&outputFormat=GML3&bbox=11.624755719505565%2C+47.93641248703169%2C+11.744637946794592%2C+48.045366254710764%2C+epsg%3A4326 or https://www.lfu.bayern.de/gdi/wfs/natur/schutzgebiete?service=WFS&version=2.0.0&request=GetFeature&typeName=landschaftsschutzgebiet&srs=epsg%3A25832&outputFormat=GML3&bbox=11.624755719505565%2C+47.93641248703169%2C+11.744637946794592%2C+48.045366254710764%2C+urn:ogc:def:crs:EPSG::4326

Best Answer

At least the server returns data if the BBOX is given in EPSG:4326 lat-lon coordinates.

https://www.lfu.bayern.de/gdi/wfs/natur/schutzgebiete?service=WFS&version=2.0.0&request=GetFeature&typeName=landschaftsschutzgebiet&srs=epsg:25832&outputFormat=GML3&bbox=47.938331252805355,11.621377748868138,48.04357841307603,11.749294923796597

Your EPSG:25832 bounding box with the urn syntax looks good to me and the syntax is as it is defined in the standard OGC 06-121r3 https://portal.ogc.org/files/?artifact_id=20040 despite you have spaces between the coordinates of the BBOX , and they should not be there. Removing the spaces did not make your query to work, though.

Related Question