osmplotr: Customisable Images of OpenStreetMap Data
- CRAN: http://cran.r-project.org/web/packages/osmplotr/index.html
- GitHub: https://github.com/mpadge/osmplotr
> library(osmplotr)
バージョン: 0.1.3
関数名 | 概略 |
---|---|
add_axes |
add_axes |
add_colourbar |
add_colorbar |
add_osm_groups |
add_osm_groups |
add_osm_objects |
add_osm_objects |
add_osm_surface |
add_osm_suface |
adjust_colours |
adjust_colours |
click_map |
click_map |
colour_mat |
colour_mat |
connect_highways |
connect_highways |
extract_highway |
extract_highway |
extract_highways |
extract_highways |
extract_osm_objects |
extract_osm_objects |
get_bbox |
get_bbox |
highways2polygon |
highways2polygon |
london |
london |
make_osm_map |
make_osm_map |
order_lines |
order_lines |
osm_structures |
osm_structures |
osmplotr |
osmplotr. |
plot_osm_basemap |
plot_osm_basemap |
add_axes
座標軸の追加
> plot_osm_basemap(bbox=get_bbox(c(-0.15, 51.5, -0.1, 51.52)), col = "gray20")
> add_osm_objects(london$dat_BNR, col = "gray40")
> add_axes()
add_colourbar
からースケールバーの追加
> plot_osm_basemap(bbox=get_bbox(c(-0.15, 51.5, -0.1, 51.52)), col = "gray20")
> add_osm_objects(london$dat_BNR, col = "gray40")
> add_axes()
> add_colourbar(cols = heat.colors(20), tcol = "white", side = 4)
add_osm_objects
osmオブジェクトを追加する
> plot_osm_basemap(bbox = get_bbox(c(-0.15, 51.5, -0.1, 51.52)), col = "gray20")
> add_osm_objects(london$dat_BNR, col = "gray40")
extract_osm_objects
> extract_osm_objects(key = "building", value = NULL, extra_pairs = NULL,
+ bbox = NULL, verbose = FALSE)
get_bbox
Argument
- latlon... 経度と緯度をベクトルで渡す
> (bbox <- c(-0.15, 51.5, -0.1, 51.52) %>% get_bbox())
min max
x -0.15 -0.10
y 51.50 51.52
london
> london %>% {
+ class(.) %>% print()
+ str(., max.level = 2)
+ }
[1] "list"
List of 15
$ dat_H :Formal class 'SpatialLinesDataFrame' [package "sp"] with 4 slots
$ dat_HP :Formal class 'SpatialLinesDataFrame' [package "sp"] with 4 slots
$ dat_BNR :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_BR :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_BC :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_A :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_G :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_P :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_N :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_T :Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
$ dat_RFH :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ dat_ST :Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
$ highways1:Formal class 'SpatialPoints' [package "sp"] with 3 slots
$ highways2:Formal class 'SpatialPoints' [package "sp"] with 3 slots
$ highways3:Formal class 'SpatialPoints' [package "sp"] with 3 slots
plot_osm_basemap
> plot_osm_basemap(bbox = get_bbox(c(-0.15, 51.5, -0.1, 51.52)), col = "gray20")
> add_osm_objects(london$dat_BNR, col = "gray40")