Dear all

I seem to have problems understanding how ogr2ogr interacts with WFS and hope someone would be able to clarify.

I have this WFS:

https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?

The capabilities document states that it supports WFS 1.0.0, 1.1.0 and 2.0.0.

If I do:

ogr2ogr -f GPKG test.gpkg "WFS:https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=stationsregistret:active_site&MAXFEATURES=100";

I get a small and nice GPKG file very fast.

But if I do:

ogr2ogr -f GPKG test.gpkg "WFS:https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=stationsregistret:active_site&COUNT=100";

It downloads the whole layer.

This behaviour can be seriously impractical for services exposing a large number of features.


Pay attention that if I do:

curl "https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=stationsregistret:active_site&COUNT=100";

it retrieves a short document fast with just 100 features. The same of course if I invoke the service using WFS 1.0.0 or 1.1.0.


What is going on here? Is it me that I misunderstood something about how ogr2ogr is supposed to interact with WFS services?

Using GDAL 3.4.0, released 2021/11/04. But the same behaviour was observed in 3.3.2.


Thanks in advance for any clarification


Hernán


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to