[gdal-dev] ogr2ogr and WFS 2
Hernán De Angelis
variablestarlight at gmail.com
Mon Nov 29 02:43:17 PST 2021
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211129/345fc083/attachment.html>
More information about the gdal-dev
mailing list