An R package to provide access to OpenStreetMap data and work with the data in R.
Questions tagged [osmar]
25 questions
1
vote
1 answer
How to overlay an osmar shape over a ggmap with R?
I am having trouble overlaying an osmar shape over a ggmap with R.
I get the osmar object (in this case it is Lake Park in Milwaukee, WI):
lp<-get_osm(relation(6044259), full=T)
I convert it to a shape:
lpp<-as_sp(lp, "lines")
This looks fine and…

Erik Wanta
- 21
- 3
1
vote
1 answer
Use osmar to load all data from an OSM file
The standard workflow for osmar is:
src <- osmsource_osmosis(file = "my_place.osm")
muc_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000)
muc <- get_osm(muc_bbox, src)
But what if I want to load all of the data from myplace.osm and don't know a…

Richard
- 56,349
- 34
- 180
- 251
1
vote
2 answers
How to convert an osmar object (OSM relation) containing several ways to a closed polygon
I was wondering how to convert an osmar object (an OSM relation) to a closed polygon by merging its 'outer' ways. The relation I want to fetch is the following: http://www.openstreetmap.org/relation/416271.
library(osmar)
wv <-…

Mathias Versichele
- 337
- 1
- 11
0
votes
1 answer
Divide efficiently an OSMAR Object into chunks in R
How could i divide efficiently an osmar object into several parts and combine them back again?
library(osmar)
src <- osmsource_api(url = "https://api.openstreetmap.org/api/0.6/")
bbox <- center_bbox(11.575278, 48.137222, 1000, 1000)
object <-…

Andreas
- 397
- 4
- 18
- 37
0
votes
2 answers
Remove empty osmar objects from the list of osmar objects
i have the folowing list nodes_found with 2 elements in this example but the number of elemets will vary in the future:
library(osmar)
>nodes_found
$`1`
osmar object
0 nodes, 0 ways, 0 relations
$`2`
osmar object
1 nodes, 0 ways, 0 relations
>…

Andreas
- 397
- 4
- 18
- 37
0
votes
1 answer
get_osm function in osmar (R) gives SSL error
Since a couple of months ago the following code run errorless
library(osmar)
src <- osmsource_api(url = "https://api.openstreetmap.org/api/0.6/")
bb <- corner_bbox(13.3,40.79,13.5,40.81)
ua <- get_osm(bb, source = src)
now it gives me…

Mattia
- 3
- 2
0
votes
1 answer
`E<-`(`*tmp*`, value = `*vtmp*`) : invalid indexing, building a subset of an OSM Object. Edit: subset does not create a true subset
Im trying to build a small subset of a bigger osm object:
First i load a bigger osm object into memory:
muc_bbox <- center_bbox(mid_point[1], mid_point[2], dist * 2, dist * 2)
src <- osmsource_osmosis(file = paste(maps_pfad,"streets_bayern.osm",sep…

Andreas
- 397
- 4
- 18
- 37
0
votes
1 answer
Shortest path from osmar object to igraph in R. Trying to replicate an osmar documentation example
i am trying to get started with openstreetmap in R and try to replicate the example given in osmar package documentation.
I get a bit data for munich.
src <- osmsource_api(url = "https://api.openstreetmap.org/api/0.6/")
muc_bbox <-…

Andreas
- 397
- 4
- 18
- 37
0
votes
1 answer
Cannot run the osmar navigation demo in R. Probably because the demo expects igraph0, which is deprecated
I am trying to run the osmar navigation demo, in R. This demo will use osmar and igraph plot a traffic route around Munich city centre, based on openstreetmap data.
I am using R version 3.1.1 on Lubuntu
The demo, and the osmar library are detailed…

user1348793
- 3
- 1
0
votes
2 answers
osmar package in R (OpenStreetMap)
The osmar package in R has a demo file called demo("navigator"). It is provided to illustrate package capabilities and functions. When I ten the script, I hit the following line and error:
R> muc <- get_osm(muc_bbox, src)
sh: osmosis: command not…

Brad Horn
- 649
- 6
- 12