<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="2"><font face="Courier New, Courier, monospace">Dear all<br>
<br>
I seem to have problems understanding how ogr2ogr interacts with
WFS and hope someone would be able to clarify.<br>
<br>
I have this WFS:<br>
<br>
<a class="moz-txt-link-freetext" href="https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs">https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs</a>?<br>
<br>
The capabilities document states that it supports WFS 1.0.0,
1.1.0 and 2.0.0.<br>
<br>
If I do:<br>
<br>
ogr2ogr -f GPKG test.gpkg
"WFS:<a class="moz-txt-link-freetext" href="https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=stationsregistret:active_site&MAXFEATURES=100">https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=stationsregistret:active_site&MAXFEATURES=100</a>"<br>
<br>
I get a small and nice GPKG file very fast.<br>
<br>
But if I do:<br>
<br>
ogr2ogr -f GPKG test.gpkg
"WFS:<a class="moz-txt-link-freetext" href="https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=stationsregistret:active_site&COUNT=100">https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=stationsregistret:active_site&COUNT=100</a>"<br>
<br>
It downloads the whole layer.<br>
<br>
This behaviour can be seriously impractical for services
exposing a large number of features.<br>
<br>
<br>
Pay attention that if I do:<br>
<br>
curl
<a class="moz-txt-link-rfc2396E" href="https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=stationsregistret:active_site&COUNT=100">"https://stationsregister.miljodatasamverkan.se/geoserver/stationsregistret/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=stationsregistret:active_site&COUNT=100"</a><br>
<br>
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.<br>
<br>
<br>
What is going on here? Is it me that I misunderstood something
about how ogr2ogr is supposed to interact with WFS services?<br>
<br>
Using GDAL 3.4.0, released 2021/11/04. But the same behaviour
was observed in 3.3.2.<br>
<br>
<br>
Thanks in advance for any clarification<br>
<br>
<br>
HernĂ¡n<br>
<br>
<br>
<br>
</font></font>
</body>
</html>