Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFS paging support #29

Closed
ghost opened this issue Aug 30, 2019 · 4 comments
Closed

WFS paging support #29

ghost opened this issue Aug 30, 2019 · 4 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Aug 30, 2019

Great work with this package!

It would be great if the WFS functionality would support paging.
Therefore, checking how many features are requested, what the per-request limit is, and iterate till all features are downloaded.

library(ows4R)
wfs <- WFSClient$new("https://geodata.nationaalgeoregister.nl/bag/wfs?", "2.0.0", logger = "DEBUG")
caps <- wfs$getCapabilities()

ft <- caps$findFeatureTypeByName("bag:pand")
ft$getDescription()`

sf <- ft$getFeatures(bbox = '110513.3,436371.4,174951.2,480440.6',resultType='hits')
getFeatures$resultType

This workaround to inform about the amount of features (resultType = 'hits') did not work, because the response of getFeatures is automatically coerced to a sf object, which renders an error since it contains no features.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@eblondel
Copy link
Owner

Thanks @mcdesignnl for reporting this, I'll look at it ASAP.

@eblondel
Copy link
Owner

eblondel commented Sep 2, 2019

@mcdesignnl I've added some code to manage resultType, see #30 when it's not set to features (default) but hits instead. For the WFS paging, I will look at it, but it requires more thinking how to refactor the actual code. This is a specific feature of WFS 2.0

@ghost
Copy link
Author

ghost commented Sep 2, 2019

@eblondel wow, thank you for adding this fix so soon. This allows me to implement a very rudimentary paging support myself.

eblondel added a commit that referenced this issue Sep 1, 2020
@eblondel
Copy link
Owner

eblondel commented Sep 2, 2020

@mcdesignnl in case you still need this, i've added WFS paging support.
To use it, it's very simple:

  • ``getFeatures(paging = TRUE, ....)
  • you can modify the paging_length, default set to 1000 for now (this is likely to be changed): getFeatures(paging = TRUE, paging_length = 10, ... )

I'm also adding support to run this WFS paging as parallel, but code still needs consolidation, I'll let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant