Learn R Programming

VicmapR (version 0.2.3)

collect.vicmap_promise: Return Data

Description

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.

Usage

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

Value

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

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

Methods (by class)

  • vicmap_promise: collect.vicmap_promise

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.

Examples

Run this code
# \donttest{
try(
vicmap_query(layer = "open-data-platform:hy_watercourse") %>%
head(5) %>%
collect()
)
# }

Run the code above in your browser using DataLab