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 = "datavic:VMHYDRO_WATERCOURSE_DRAIN") %>%
head(5) %>%
collect()
)
#> Simple feature collection with 5 features and 15 fields
#> Geometry type: LINESTRING
#> Dimension:     XY
#> Bounding box:  xmin: 142.7675 ymin: -35.06905 xmax: 143.324 ymax: -35.04559
#> Geodetic CRS:  GDA94
#> # A tibble: 5 × 16
#>   id                  PFI    UFI FEATURE_TYPE_CODE NAME  NAMED_FEATURE_ID ORIGIN
#>   <chr>             <int>  <int> <chr>             <chr> <chr>            <chr> 
#> 1 VMHYDRO_WATERC… 8553127 2.55e6 watercourse_chan… NA    NA               2     
#> 2 VMHYDRO_WATERC… 8553130 2.55e6 watercourse_chan… NA    NA               2     
#> 3 VMHYDRO_WATERC… 8553143 2.55e6 watercourse_chan… NA    NA               2     
#> 4 VMHYDRO_WATERC… 8553149 2.55e6 watercourse_chan… NA    NA               2     
#> 5 VMHYDRO_WATERC… 8553158 2.55e6 watercourse_chan… NA    NA               2     
#> # … with 9 more variables: CONSTRUCTION <chr>, USAGE <chr>, HIERARCHY <chr>,
#> #   FEATURE_QUALITY_ID <int>, CREATE_DATE_PFI <dttm>, SUPERCEDED_PFI <chr>,
#> #   CREATE_DATE_UFI <dttm>, OBJECTID <int>, geometry <LINESTRING [°]>
# }