collect() will force the execution of the vicmap_promise query. In doing so it will return an sf object into memory.

See dplyr::collect for details.

# S3 method for vicmap_promise
collect(x, quiet = FALSE, paginate = TRUE, ...)

Arguments

x

object of class vicmap_promise (likely passed from vicmap_query())

quiet

logical; whether to suppress the printing of messages and progress

paginate

logical; whether to allow pagination of results to extract all records (default is TRUE, meaning all data will be returned but it will take more time)

...

additional arguments passed to st_read

Value

sf/tbl_df/tbl/data.frame matching the query parameters

Details

Collecting certain datasets without filters will likely result in a large object being returned. Given that their is a limit on the number of rows that can be returned from the Vicmap geoserver (70,000) data will be paginated; which essentially means that multiple queries will be sent with the data bound together at the end. This process may take a while to run, thus it is recommended to filter large datasets before collection.

Methods (by class)

  • vicmap_promise: collect.vicmap_promise

Examples

# \donttest{
try(
vicmap_query(layer = "open-data-platform:hy_watercourse") %>%
head(5) %>%
collect()
)
#> Simple feature collection with 5 features and 20 fields
#> Geometry type: LINESTRING
#> Dimension:     XY
#> Bounding box:  xmin: 146.3073 ymin: -38.99322 xmax: 146.3657 ymax: -38.9847
#> Geodetic CRS:  GDA94
#> # A tibble: 5 × 21
#>   id                  ufi    pfi feature_type_code name  named_feature_id origin
#>   <chr>             <int>  <int> <chr>             <chr> <chr>            <chr> 
#> 1 hy_watercourse.1 3.63e6 9.63e6 watercourse_stre… NA    NA               1     
#> 2 hy_watercourse.2 3.63e6 9.63e6 watercourse_stre… NA    NA               1     
#> 3 hy_watercourse.3 3.63e6 9.63e6 watercourse_stre… NA    NA               1     
#> 4 hy_watercourse.4 3.63e6 9.63e6 watercourse_stre… NA    NA               1     
#> 5 hy_watercourse.5 3.63e6 9.63e6 watercourse_stre… NA    NA               1     
#> # ℹ 14 more variables: construction <chr>, usage <chr>, hierarchy <chr>,
#> #   auth_org_code <chr>, auth_org_id <chr>, auth_org_verified <chr>,
#> #   feature_quality_id <int>, task_id <chr>, create_date_pfi <dttm>,
#> #   superceded_pfi <chr>, feature_ufi <int>, feature_create_date_ufi <dttm>,
#> #   create_date_ufi <dttm>, geometry <LINESTRING [°]>
# }