Read all GeoNetwork / Geoportal metadata in chunks
Source:R/read_metadata_all.R
read_metadata_all.RdThis function uses read_metadata() repeatedly to fetch all available
metadata records from a GeoNetwork endpoint that supports from / to
pagination (like the GDI Berlin instance).
Usage
read_metadata_all(
base_url =
"https://gdi.berlin.de/geonetwork/srv/ger/q?facet.q=type/service&resultType=details&sortBy=changeDate&fast=index",
chunk_size = 100
)Value
A tibble with one row per metadata record, identical in structure
to the return value of read_metadata(), but for all pages.
Details
It first downloads the initial XML, reads the <summary count="...">
attribute to know how many records exist, then iterates in chunks
(default: 100) until all records are read.
Examples
if (FALSE) { # \dontrun{
all_md <- read_metadata_all()
nrow(all_md)
} # }