bcdc_check_geom_size: Check spatial objects for WFS spatial operations

View source: R/cql-geom-predicates.R

bcdc_check_geom_sizeR Documentation

Check spatial objects for WFS spatial operations

Description

Check a spatial object to see if it exceeds the current set value of 'bcdata.max_geom_pred_size' option, which controls how the object is treated when used inside a spatial predicate function in filter.bcdc_promise(). If the object does exceed the size threshold a bounding box is drawn around it and all features within the box will be returned. Further options include:

  • Try adjusting the value of the 'bcdata.max_geom_pred_size' option

  • Simplify the spatial object to reduce its size

  • Further processing on the returned object

Usage

bcdc_check_geom_size(x)

Arguments

x

object of class sf, sfc or sfg

Details

See the Querying Spatial Data with bcdata for more details.

Value

invisibly return logical indicating whether the check pass. If the return value is TRUE, the object will not need a bounding box drawn. If the return value is FALSE, the check will fails and a bounding box will be drawn.

Examples


try({
  airports <- bcdc_query_geodata("bc-airports") %>% collect()
  bcdc_check_geom_size(airports)
})


bcdata documentation built on March 31, 2023, 8:10 p.m.