osmar

Osmar package in R “Error in file(con, ”r“) : cannot open the connection”

一曲冷凌霜 提交于 2021-02-10 12:06:39
问题 I am trying to run the osmar package on my windows 10, R 3.4.2, and have correctly installed osmosis. However when I try to run the code: >library("osmar") > >src <- osmsource_osmosis(file = "c:/users/ben_c/Documents/FYP/FYP_NL_Map/muenchen.osm", osmosis = "osmosis") > > >nl_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000) > >nl <- get_osm(nl_bbox, src) > >plot(nl) I get the warning, after osmosis has run: >Error in file(con, "r") : cannot open the connection >In addition: Warning

Osmar package in R “Error in file(con, ”r“) : cannot open the connection”

故事扮演 提交于 2021-02-10 12:05:56
问题 I am trying to run the osmar package on my windows 10, R 3.4.2, and have correctly installed osmosis. However when I try to run the code: >library("osmar") > >src <- osmsource_osmosis(file = "c:/users/ben_c/Documents/FYP/FYP_NL_Map/muenchen.osm", osmosis = "osmosis") > > >nl_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000) > >nl <- get_osm(nl_bbox, src) > >plot(nl) I get the warning, after osmosis has run: >Error in file(con, "r") : cannot open the connection >In addition: Warning

Osmar package in R “Error in file(con, ”r“) : cannot open the connection”

坚强是说给别人听的谎言 提交于 2021-02-10 12:05:02
问题 I am trying to run the osmar package on my windows 10, R 3.4.2, and have correctly installed osmosis. However when I try to run the code: >library("osmar") > >src <- osmsource_osmosis(file = "c:/users/ben_c/Documents/FYP/FYP_NL_Map/muenchen.osm", osmosis = "osmosis") > > >nl_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000) > >nl <- get_osm(nl_bbox, src) > >plot(nl) I get the warning, after osmosis has run: >Error in file(con, "r") : cannot open the connection >In addition: Warning

Osmar package in R “Error in file(con, ”r“) : cannot open the connection”

前提是你 提交于 2021-02-10 12:04:49
问题 I am trying to run the osmar package on my windows 10, R 3.4.2, and have correctly installed osmosis. However when I try to run the code: >library("osmar") > >src <- osmsource_osmosis(file = "c:/users/ben_c/Documents/FYP/FYP_NL_Map/muenchen.osm", osmosis = "osmosis") > > >nl_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000) > >nl <- get_osm(nl_bbox, src) > >plot(nl) I get the warning, after osmosis has run: >Error in file(con, "r") : cannot open the connection >In addition: Warning

Optimize the runtime: change the weight of edges in an igraph takes long time. Is there a way to optimize it?

删除回忆录丶 提交于 2021-01-21 10:27:03
问题 I am searching for a set of edges in an igraph built from an osmar object and would like to change the weight of these. Since my graph is quite big, this task takes quite a long time. Since I run this function in a loop the runtime grows even bigger. Is there a way I could optimize this? Here is the code: library(osmar) library(igraph) library(tidyr) library(dplyr) ### Get data ---- src <- osmsource_api(url = "https://api.openstreetmap.org/api/0.6/") muc_bbox <- center_bbox(11.575278, 48

Optimize the runtime: change the weight of edges in an igraph takes long time. Is there a way to optimize it?

安稳与你 提交于 2021-01-21 10:25:11
问题 I am searching for a set of edges in an igraph built from an osmar object and would like to change the weight of these. Since my graph is quite big, this task takes quite a long time. Since I run this function in a loop the runtime grows even bigger. Is there a way I could optimize this? Here is the code: library(osmar) library(igraph) library(tidyr) library(dplyr) ### Get data ---- src <- osmsource_api(url = "https://api.openstreetmap.org/api/0.6/") muc_bbox <- center_bbox(11.575278, 48

Shortest path from osmar object to igraph in R. Trying to replicate an osmar documentation example

核能气质少年 提交于 2020-07-10 07:47:51
问题 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 <- center_bbox(11.575278, 48.137222, 1000, 1000) muc <- get_osm(muc_bbox, src) I get a subset of all highways in munich hways_muc <- subset(muc, way_ids = find(muc, way(tags(k == "highway")))) hways <- find(hways_muc, way(tags(k == "name"))) hways <- find_down(muc,

How to extract specific values from a DEM (digital elevation model)?

半城伤御伤魂 提交于 2020-01-04 06:25:26
问题 I'm trying to calculate elevation data for hiking routes, using open data (avoiding licensing constraints like Google). I was able to read a public DEM of my country (with a 10-metres resolution) using readGDAL (from package RGDAL), and proj4string(mygrid) gives me: "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" The beginning of the .asc file is: ncols 9000 nrows 8884 xllcorner 323256,181155 yllcorner 4879269,74709 cellsize 10 NODATA_value -9999 978 998 1005

How to extract specific values from a DEM (digital elevation model)?

左心房为你撑大大i 提交于 2020-01-04 06:25:22
问题 I'm trying to calculate elevation data for hiking routes, using open data (avoiding licensing constraints like Google). I was able to read a public DEM of my country (with a 10-metres resolution) using readGDAL (from package RGDAL), and proj4string(mygrid) gives me: "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" The beginning of the .asc file is: ncols 9000 nrows 8884 xllcorner 323256,181155 yllcorner 4879269,74709 cellsize 10 NODATA_value -9999 978 998 1005