| .get_pbf_extent | R Documentation |
Tries multiple methods to extract the bounding box from an OSM PBF file:
Pure R header parsing (fastest, no dependencies)
osmium CLI (if available in PATH)
sf sampling (if sf is installed, reads first 10 features)
.get_pbf_extent(pbf_file)
pbf_file |
Path to an .osm.pbf file |
Named list with center (c(lng, lat)) and bbox (c(lng_min, lat_min, lng_max, lat_max))
or NULL if bbox could not be determined
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.