knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
bigosm reads in particularly large OSM XML exports (>400MB) that cause osmar's XML reader to choke.
You can install the development version of bigosm from GitHub with:
# install.packages("devtools") install_github("cmu-lib/bigosm")
read_big_osm
does what it says on the label. By specifying required keys for both Ways and Relations you can pre-filter the XML that ends up getting pulled into R.
library(bigosm) library(osmar)
boston_xml <- system.file("extdata/boston.xml.zip", package = "bigosm") boston_osm <- read_big_osm(file = boston_xml, way_keys = "highway") summary(boston_osm)
This package is one of several originally developed by Matthew Lincoln for use by Carnegie Mellon University's "Bridges of Pittsburgh" project:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.