[Qgis-user] Short question on wfs

Richard Duivenvoorde rdmailings at duif.net
Mon Sep 7 02:22:07 PDT 2020


On 9/7/20 11:02 AM, Richard Duivenvoorde wrote:
> 'Paging' is in WFS since 2.0. It means that for larger datasets, the service makes is it possible to request features (in a bbox) based on a COUNT-parameter and a START(?)-parameter.
> So when in a box there are 60000 features, and the service allowes only to request 10000 feature at a time, you can do that by request six 'pages':
> start=0&count=10000
> start=10000&count=10000
> start=20000&count=10000
> etcetc
> 
> This off course makes logic both on client AND serverside more difficult: what if the users zooms out, so part of the features are already loaded in QGIS/client etc etc... 
> Serverside this means that you need to have your features ordered and sorted on a primary key, otherwise you cannot service the 'next' 10000 etc etc

If you look for 'Response paging' in the WFS 2.0 spec docs [0], you see that:

"Response paging is the ability of a client to scroll through a set of response features or values, N features or
values at-a-time much like one scrolls through the response from a search engine one page at a time.
Servers that support response paging shall advertise this fact in their capabilities document using the
ImplementsResultPaging constraint (see Table 13)."

If you look into the capabilties do of your service, you see:
ImplementsResultPaging = FALSE

So it is a little silly to setup a service of such a big dataset without paging I think? Although it can be usefull if you only request very small parts (at a time) of course

If you want to see 'paging' at work, you can test this service
https://geodata.nationaalgeoregister.nl/bag/wfs/v1_1?SERVICE=WFS&request=Getcapabilities
(on a small part of The Netherlands, this service holds ALL house in NL)

If you load that service in QGIS you get blocks of 1000 houses back in QGIS, and in the networklogger you see:
COUNT=1000 (this number comes from a maxcount number in the capabilities) and STARTINDEX=xxx (so it is 'startindex' and not 'start' as I stated earlier...).

Regards,

Richard

[0] https://www.ogc.org/standards/wfs#downloads


More information about the Qgis-user mailing list