<- "ftp://ftp.bom.gov.au/anon/home/geofabric/" url
Get australia geofabric
To get the australia river geofabric gdb. The links are here, the mapservice links are all annoyingly interactive, though I imagine there’s a way to httr2
them.
See what’s there
<- RCurl::getURL(url) |>
files strsplit("\r*\n") |>
unlist()
<- stringr::str_extract(files, '\\s([^ ]+)$') |>
filenames ::str_remove_all(' ')
stringr filenames
[1] "GW_Cartography_GDB_V3_3.zip"
[2] "Geofabric_Metadata_GDB_V3_3.zip"
[3] "Geofabric_National_V3_3_PRODUCT_README.txt"
[4] "Geofabric_Sample_Toolset_v1_6_1.zip"
[5] "Geofabric_V3x_FTP_README.txt"
[6] "Geofabric_V3x_Feedback_Form.docx"
[7] "HR_Catchments_GDB_V3_3.zip"
[8] "HR_Regions_GDB_V3_3.zip"
[9] "SH_Cartography_GDB_V3_3.zip"
[10] "SH_Catchments_GDB_V3_3.zip"
[11] "SH_Network_GDB_V3_3.zip"
[12] "version2"
we don’t want ‘version2’, but otherwise, let’s download all of that.
It’s a lot of data, so it’ll take a while. Turn the eval off unless we actually want to run this.
if (!dir.exists('data/geofabric')) {
dir.create('data/geofabric')
}
<- filenames[filenames != 'version2']
filestodl
system.time(
::map(filestodl,
purrr::curl_download(paste0(url, x),
\(x) curldestfile = paste0('data/geofabric/', x)))
)