Note: The package is currently windows only
Install the package with remotes as follows:
install.packages("remotes") # If you do not already have the remotes package remotes::install_github("ITSleeds/OSMTools")
This R package provides a userfiendly interface to the Windows command line tools osmfilter.exe and osmconvert.exe. For example, if you wanted to get the road in your local area.
You can download a section of the OSM for your local area from Geofabrik.
osmt_geofabrik_dl(region = "europe/great-britain/england/west-yorkshire", destfile = "wy.pbf")
Then convert the PBF file into a format that can be edited.
osmt_convert(file = "wy.pbf", format_out = "o5m")
Then make a new file with just the roads.
osmt_filter(file = "wy.o5m", path_out = "wy_roads.o5m", keep = "highway=")
Please note that the
OSMtools project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
This package is part of ongoing research at the University of Leeds, it is provided "as is" and is likely to be updated and changed without warning to meet the research needs of the University.