Skip to contents

This function retrieves bcdata specific options that can be set. These options can be set using option({name of the option} = {value of the option}). The default options are purposefully set conservatively to hopefully ensure successful requests. Resetting these options may result in failed calls to the data catalogue. Options in R are reset every time R is re-started. See examples for additional ways to restore your initial state.

Usage

bcdc_options()

Details

bcdata.max_geom_pred_size is the maximum size in bytes of an object used for a geometric operation. Objects that are bigger than this value will have a bounding box drawn and apply the geometric operation on that simpler polygon. The bcdc_check_geom_size function can be used to assess whether a given spatial object exceeds the value of this option. Users can iteratively try to increase the maximum geometric predicate size and see if the bcdata catalogue accepts the request.

bcdata.chunk_limit is an option useful when dealing with very large data sets. When requesting large objects from the catalogue, the request is broken up into smaller chunks which are then recombined after they've been downloaded. This is called "pagination". bcdata does this all for you, however by using this option you can set the size of the chunk requested. On slower connections, or when having problems, it may help to lower the chunk limit.

bcdata.single_download_limit Deprecated. This is the maximum number of records an object can be before forcing a paginated download; it is set by querying the server capabilities. This option is deprecated and will be removed in a future release. Use bcdata.chunk_limit to set a lower value pagination value.

Examples

# \donttest{
## Save initial conditions
try(
  original_options <- options()
)

## See initial options
try(
  bcdc_options()
)
#> # A tibble: 3 × 3
#>   option                       value default
#>   <chr>                        <dbl>   <dbl>
#> 1 bcdata.max_geom_pred_size       NA  500000
#> 2 bcdata.chunk_limit              NA   10000
#> 3 bcdata.single_download_limit 10000   10000

try(
  options(bcdata.max_geom_pred_size = 1E6)
)

## See updated options
try(
  bcdc_options()
)
#> # A tibble: 3 × 3
#>   option                         value default
#>   <chr>                          <dbl>   <dbl>
#> 1 bcdata.max_geom_pred_size    1000000  500000
#> 2 bcdata.chunk_limit                NA   10000
#> 3 bcdata.single_download_limit   10000   10000

## Reset initial conditions
try(
  options(original_options)
)
# }