Skip to content

Commit

Permalink
correcting build error in vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivann Schlosser authored and Ivann Schlosser committed Jul 18, 2024
1 parent 87dc332 commit 05c1d59
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions vignettes/data_schema.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "An opinionated way of working with OSM data."
title: "An opinionated way of working with OSM data"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{An opinionated way of working with OSM data.}
Expand All @@ -15,8 +15,6 @@ knitr::opts_chunk$set(eval = FALSE
```



## Introduction

Anyone who has used OpenStreetMap (OSM) data in R or python might agree that the tagging system, while it provides great flexibility and extensive classification options, is sometimes a bit challenging to work with. This vignettes will explain the approach to the tagging system that aims to make it easy to interact with features, their associated tags and their geometries. The main ambition being providing an easy access to large OSM data sets.
Expand Down Expand Up @@ -86,22 +84,18 @@ Arguably, some tags don't fall into any of these categories, yet you can export

By default, only tags with keys $amenity,shop,tourism$ will be extracted.

- <div>

```{r}
```{r}
library(cppRnet)
library(sf)
library(cppRnet)
library(sf)
test_file <- system.file(package = 'cppRnet','extdata','map.osm')
test_file <- system.file(package = 'cppRnet','extdata','map.osm')
data <- cppRnet::extract_data(test_file)
data <- cppRnet::extract_data(test_file)
head(data)
```
head(data)
</div>
```

The geometry is simplified to the centroid, for which the coordinates are provided in the lon,lat columns of the data table. A function allowing to reconstruct the full geometry is provided, but since it is not necessarily always usefull to have it, it is ommited in a first extraction. The nodes that constitute a full geometry, if it is more complex than a point, are added to the attrs column as a `data.frame`. These geometries are always closed, meaining they are polygons. This is meant to save memory especially for large data sets.

Expand Down

0 comments on commit 05c1d59

Please sign in to comment.