bcgov / bcdata

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

Bbox text #258

Closed boshek closed 3 years ago

boshek commented 3 years ago

Will address #243

I have taken the reviewer advice and extracted a "checking function". You can either be notified on the fly:

R> districts <- bcdc_query_geodata("78ec5279-4534-49a1-97e8-9d315936f08b") %>%
   filter(SCHOOL_DISTRICT_NAME %in% c("Greater Victoria", "Prince George","Kamloops/Thompson")) %>%
   select(SCHOOL_DISTRICT_NAME) %>%
   collect()
R> districts_parks <- bcdc_query_geodata("6a2fea1b-0cc4-4fc2-8017-eaf755d516da") %>%
   filter(PARK_PRIMARY_USE == "Park") %>%
   filter(INTERSECTS(districts)) %>%
   collect()
The object is too large to perform exact spatial operations using bcdata.
Object size: 948576 bytes
BC Data Threshold: 5e+05 bytes
Exceedance: 448576 bytes
See ?bcdc_size_check for more details

Or you can check ahead of time:

R> bcdc_size_check(districts)
The object is too large to perform exact spatial operations using bcdata.
Object size: 948576 bytes
BC Data Threshold: 5e+05 bytes
Exceedance: 448576 bytes
See ?bcdc_size_check for more details

~Not implemented yet is a test~

boshek commented 3 years ago

/precompile