-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix cql parsing. Fixes #146 #154
Conversation
Instead of early evaluation of nested calls as previously attempted, modify the call to wrap nested calls in local() so that dbplyr::partial_eval knows to evaluate them. #146
Sorry to include an unrelated thing in here (fixing/testing local <- bcdc_query_geodata("regional-districts-legally-defined-administrative-areas-of-bc") %>%
filter(ADMIN_AREA_NAME == "Cariboo Regional District") %>%
collect()
bcdc_query_geodata("bc-parks-ecological-reserves-and-protected-areas") %>%
filter(RELATE(local, "*********")) %>%
collect()
#> Warning: The object is too large to perform exact spatial operations using bcdata.
#> To simplify the polygon, a bounding box was drawn around the polygon and all
#> features within the box will be returned. Options include further processing
#> with on the returned object or simplify the object.
#> Warning in bcdc_number_wfs_records(query_list, cli): NAs introduced by coercion
#> Error in if (number_of_records < 10000) {: missing value where TRUE/FALSE needed Any thoughts? |
If I
|
Interesting. The argument isn't even recognized using the CRAN version but the error also shows up in the master branch of this repo. library(bcdata)
#>
#> Attaching package: 'bcdata'
#> The following object is masked from 'package:stats':
#>
#> filter
packageVersion("bcdata")
#> [1] '0.1.1'
local <- bcdc_query_geodata("regional-districts-legally-defined-administrative-areas-of-bc") %>%
filter(ADMIN_AREA_NAME == "Cariboo Regional District") %>%
collect()
#> Warning: It is advised to use the permanent id ('d1aff64e-dbfe-45a6-af97-582b7f6418b9') rather than the name of the record ('regional-districts-legally-defined-administrative-areas-of-bc') to guard against future name changes.
bcdc_query_geodata("bc-parks-ecological-reserves-and-protected-areas") %>%
filter(RELATE(local, "*********"))
#> Error in RELATE(structure(list(id = "WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_REGIONAL_DISTRICTS_SP.18", : unused argument ("*********") Created on 2019-12-12 by the reprex package (v0.3.0) |
Some further info which doesn't directly address the problem but is worth noting. With
Without
With
|
Ok so I haven't completely figured out why but when using Line 28 in e81c926
we add the parameter to get the total number of records. That wfs sever doesn't like that request and so no number is returned. If I am right, I think at this time our only option is to remove |
Ok, thanks for digging in. I'm fine with removing it. Should we just not export it? Or do you think remove the code completely? |
Fine to just not export. We need a news item as well. |
WIP for #146