bcgov / bcdata

An R package for searching & retrieving data from the B.C. Data Catalogue
https://bcgov.github.io/bcdata
Apache License 2.0
82 stars 13 forks source link

Remove workaround for generalized datasets #292

Closed ateucher closed 2 years ago

ateucher commented 2 years ago

Some of the warehouse objects are generalized/simplified for distribution via the WMS – and these are (mostly?) denoted with an _SPG suffix (for example this record; WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG).

Currently we require a workaround with the catalogue api because the resource.object_name would often be _SP while the wfs typeNames parameter resource.url would be _SPG (See this note.

DataBC are rectifying this mismatch and we can remove the workaround when that is complete.

boshek commented 2 years ago

Is this a duplicate of #129?

Also I think the cause of this right?

ateucher commented 2 years ago

i think this is actually reversing what we did to address #129, as they are now fixing it so the names are the same.

And yes, DataBC resolving the mismatched names is what is causing that test failure (no warning produced).

However I think it's still worth considering if we should catch when something is simplified so the user is aware

boshek commented 2 years ago

What if this line was changed to detect for a "_SPG" string and deliver a message if so?

And then modify this test so that it just checks for a message notifying the user that the layer has been simplified?

ateucher commented 2 years ago

So Ive changed my mind and I think we should continue to extract the value for the typeNames parameter from the resource.url rather than from the resource.object_name - I think it's safer in case there are any objects that haven't been fixed. But changing the test as you suggest @boshek is great. PR incoming