Skip to content
/ cppRnet Public

Efficient OSM in R with the osmium library.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

ischlo/cppRnet

Repository files navigation

Ivann Schlosser

R-CMD-check Lifecycle: stable

Introduction

This package uses the libosmium library in the background and proposes an opinionated way of interacting with raw OSM data. It is opinionated, because a number of assumptions are made, based on a long and sometimes frustrating experience of working with OSM data in R or python projects. The assumptions and the proposed data schema will be covered in a separate vignette. This part will mainly cover the setup of the package.

Setup dependencies

This section is under development, it will be a quick setup guide for the compiled dependencies.

Installation

The usage of cppRnet relies on the libosmium library, which needs to be installed on the machine. For more details on installation refer to the official website. On mac, it is recommended to install using brew with the following terminal command:

brew install libosmium

Next, install the package itself from github:

# remotes::install_github('ischlo/cppRnet')
# devtools::install_github('ischlo/cppRnet')
# pak::pak("ischlo/cppRnet")

The package will detect the presence of the library and notify you if it doesn’t see it. Once the library is installed, you will need a OSM extract file, you can get one by manually exporting a selected area from OSM, or for bigger areas, the best approach is to download a geofabrick extract.

Notes

This is a early stage development package that could develop more functionalities for integrating the extremely performant osmium library with a user friendly R workflow. The choice has been made for graph data, to first export it to .csv files and only after reading it into R. This is to avoid potentially creating files that are to big to be handled by the R environment, while still extracting the data. However, this process can fail sometimes, resulting in loss of unsaved data in the active R environment. Best practices and the optimal workflows are covered in a separate vignette.

References

There are a few great packages for working with OSM data, they all provide a wide set of functionalities. If the size of your data is not excessive, like small city-village scale, osmdata might be your tool of choice in R. If the data gets bigger, osmextract could be the right choice. This package aims to be both user friendly and flexible, but also high performing.

language package
R osmdata,osmextract
python pydriosm, pyrosm, osmium

About

Efficient OSM in R with the osmium library.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages