Skip to content

mobility-team/osmdata.mobility

 
 

Repository files navigation

osmdata.mobility

osmdata.mobility is a Mobility-oriented fork of ropensci/osmdata.

The R package name is osmdata.mobility to avoid confusion with the upstream CRAN package osmdata. It keeps the original osmdata API; exported functions such as opq(), add_osm_feature(), osmdata_sf(), and osmdata_xml() are unchanged.

For the full upstream package presentation, examples, and original OpenStreetMap/Overpass documentation, see the original osmdata README:

https://github.com/ropensci/osmdata#readme

What This Fork Changes

This fork carries Mobility packaging and integration changes for workflows that read downloaded OpenStreetMap XML files repeatedly.

The current changes are:

  • The package is renamed to osmdata.mobility.
  • The fork is published from mobility-team/osmdata.mobility.
  • File-based Overpass XML input follows the performance change from ropensci/osmdata#248: fill_overpass_data() reads the XML file directly with readChar() instead of parsing it and converting it back to text.
  • The package is listed in the Mobility R-universe registry.

Installation

From Mobility R-universe:

install.packages(
  "osmdata.mobility",
  repos = c("https://mobility-team.r-universe.dev", "https://cloud.r-project.org")
)

From GitHub:

install.packages("remotes")
remotes::install_github("mobility-team/osmdata.mobility")

Basic Usage

library(osmdata.mobility)

q <- opq("Geneva, Switzerland") |>
  add_osm_feature(key = "highway")

roads <- osmdata_sf(q)

Reusing Saved OSM XML

For Mobility workflows, download OSM XML once and read the saved file directly in later steps:

q <- opq("Geneva, Switzerland") |>
  add_osm_feature(key = "highway")

osmdata_xml(q, filename = "geneva-roads.osm")

roads <- osmdata_sf(doc = "geneva-roads.osm")

Versioning

This fork currently publishes osmdata.mobility version 0.2.5.005, based on upstream osmdata plus the file-based XML read performance change.

License

This fork follows the upstream osmdata license: GPL-3.

About

R package for downloading OpenStreetMap data

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • R 56.7%
  • C++ 37.7%
  • HTML 4.9%
  • TeX 0.4%
  • C 0.2%
  • Makefile 0.1%