lifewatch/eurobis

feature suggestion: filter on fieldnames

Opened this issue · 4 comments

Hello,

Using the getEurobisData() function I haven't found a way to filter on fieldnames. The function has a "type" argument that does this to an extend, but to really choose between fieldnames would be handy I think.

Thank you!

Dear @bakeevdias, do you mean that you would like to select a subset of output columns, or that you want to filter on the values in certain column?

Hi @LennertSchepers,

I mean a subset of output columns, like for example the "robis" package with the function occurrence and its argument fields:

test <- occurrence(taxonid = 158812, fields = c("scientificNameID","locationID"))

It should be feasible to implement this as the wfs service enables this by the propertyName key, see https://docs.geoserver.org/latest/en/user/services/wfs/reference.html

It is possible since 567f7d3 to pass any vendorParams to ows4R in eurobis_occurrences(...) and family, including propertyName.

I can write a wrapper if this is still needed, or happy to merge pull requests.

Although we should include a sanity check: no possible to query columns that don't exists + what columns exists?
I reckon there is a WFS request that gives the attribute names of a feature and some info about their data types, but need to look in detal