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

paging=TRUE results in error: no layers in datasource #27

Closed
johannow opened this issue Oct 23, 2023 · 3 comments
Closed

paging=TRUE results in error: no layers in datasource #27

johannow opened this issue Oct 23, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@johannow
Copy link

I tried to download the following subset via the URL below:
URL <- "https://geo.vliz.be/geoserver/Dataportal/wfs?version=1.1.0&request=GetFeature&typeName=eurobis-obisenv_basic&resultType=results&viewParams=where%3Adatasetid+IN+%283117%29+AND+%28%28observationdate+BETWEEN+%271990-01-01%27+AND+%272019-12-31%27+%29%29+AND+aphiaid+IN+%28+SELECT+aphiaid+FROM+eurobis.taxa_attributes+WHERE+selectid+IN+%28%27mammals%27%5C%2C%27pisces%27%29%29%3Bcontext%3A0100&propertyName=datasetid%2Cdatecollected%2Cdecimallatitude%2Cdecimallongitude%2Ccoordinateuncertaintyinmeters%2Cscientificname%2Caphiaid%2Cscientificnameaccepted&outputFormat=csv"

The code below works.
test <- eurobis_occurrences_basic(url=URL)

However, trying the same with
test <- eurobis_occurrences_basic(url=URL,paging=TRUE)
always results in the following error: "Error: No layers in datasource."
Trying different paging_length values does not make a difference.

@bart-v
Copy link
Contributor

bart-v commented Oct 23, 2023

@salvafern : API or R code ...?

@bart-v bart-v added the bug Something isn't working label Oct 23, 2023
@salvafern
Copy link
Collaborator

Try with version=2.0 (See eblondel/ows4R#70 (comment))

@johannow
Copy link
Author

wfs <- WFSClient$ new("https://geo.vliz.be/geoserver/Dataportal/wfs", "2.0.0", logger = "INFO")$ getCapabilities()$ findFeatureTypeByName("Dataportal:eurobis-obisenv_basic")

params <- "where%3A%28%28up.geoobjectsids+%26%26+ARRAY%5B2350%5D%29%29+AND+datasetid+IN+%28216%29%3Bcontext%3A0100%3Baphiaid%3A104464"

#with pagination system.time(feature_pagination <- wfs$getFeatures(viewParams = params, paging = TRUE, paging_length = 1000))
`
This results in the following error:
image

Also changing the "wfs?version=1.1.0" to "wfs?version=2.0.0" in the URL I mentioned before does not fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants