Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cmu-lib/bigosm

Read very large OSM exports into osmar
https://github.com/cmu-lib/bigosm

Last synced: 3 months ago
JSON representation

Read very large OSM exports into osmar

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# bigosm

[![Travis build status](https://travis-ci.org/cmu-lib/bigosm.svg?branch=master)](https://travis-ci.org/cmu-lib/bigosm)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/cmu-lib/bigosm?branch=master&svg=true)](https://ci.appveyor.com/project/cmu-lib/bigosm)
[![Coverage status](https://codecov.io/gh/cmu-lib/bigosm/branch/master/graph/badge.svg)](https://codecov.io/github/c/bigosm?branch=master)

bigosm reads in particularly large OSM XML exports (>400MB) that cause [osmar]'s XML reader to choke.

## Installation

You can install the development version of bigosm from GitHub with:

```{r, eval = FALSE}
# install.packages("devtools")
install_github("cmu-lib/bigosm")
```

## Usage

`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.

```{r, include = FALSE}
library(bigosm)
library(osmar)
```

```{r}
boston_xml <- system.file("extdata/boston.xml.zip", package = "bigosm")

boston_osm <- read_big_osm(file = boston_xml, way_keys = "highway")

summary(boston_osm)
```

[osmar]: https://cran.r-project.org/package=osmar

[Ways]: https://wiki.openstreetmap.org/wiki/Way

[Relations]: https://wiki.openstreetmap.org/wiki/Relation

## Context

This package is one of several originally developed by [Matthew Lincoln](https://github.com/mdlincoln) for use by Carnegie Mellon University's ["Bridges of Pittsburgh"](http://bridgesofpittsburgh.net/) project:

- [konigsberger] (end-user package)
- [pathfinder]
- [bigosm]
- [simplygraph]

[konigsberger]: https://cmu-lib.github.io/konigsbergr/index.html

[pathfinder]: https://github.com/cmu-lib/pathfinder/

[simplygraph]: https://github.com/cmu-lib/simplygraph

[bigosm]: https://github.com/cmu-lib/bigosm