I try to load a WFS including a bbox parameter via PyQGIS. The WFS is loaded without problems, but unfortunately the bbox parameter does not work. If the bbox parameter is added to the query I get all the results, including the results that are outside of the bbox range. When I start the request in the browser or using the QGIS GUI, I get the correctly filtered features. It looks like PyQGIS does not take into account the bbox parameter.
My code looks like this:
vl = QgsVectorLayer("https://wxs.ign.fr/administratif/geoportail/wfs?VERSION=2.0.0&TYPENAMES=ADMINEXPRESS-COG-CARTO.LATEST:arrondissement&COUNT=1000&SRSNAME=EPSG::4326&BBOX=42.374778,-2.109375,47.115000,2.856445", 'water', 'WFS')
QgsMapLayerRegistry.instance().addMapLayer(vl)
Is this a known bug or something missing in my request?
As already said, in the browser or via the QGIS GUI the request works, but not with PyQGIS.