Package 'maposm'

Title: Get City Map Layers from OpenStreetMap
Description: Download various OpenStreetMap features to create city map layers.
Authors: Timothée Giraud [cre, aut]
Maintainer: Timothée Giraud <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2025-02-03 11:25:00 UTC
Source: https://github.com/riatelab/maposm

Help Index


Get City Map Layers

Description

Download various OpenStreetMap features to create city map layers.

Usage

get_city(x, r = 1000, verbose = TRUE)

Arguments

x

city center coordinates

r

radi of the extraction

verbose

output messages

Value

A list of layers is returned.

Examples

## Not run: 
bb1 <- osmdata::getbb("Gare Matabiau, 31000 TOULOUSE, France")
lon <- mean(bb1[1, ])
lat <- mean(bb1[2, ])
res <- get_city(c(lon, lat), dist = 700)
if (require("mapsf")){
  mf_map(res$circle, col = "#f2efe9", border = NA, add = FALSE)
  mf_map(res$green, col = "#c8facc", border = "#c8facc", lwd = .5, add = TRUE)
  mf_map(res$water, col = "#aad3df", border = "#aad3df", lwd = .5, add = TRUE)
  mf_map(res$railway, col = "grey50", lty = 2, lwd = .2, add = TRUE)
  mf_map(res$road, col = "white", border = "white", lwd = .5, add = TRUE)
  mf_map(res$street, col = "white", border = "white", lwd = .5, add = TRUE)
  mf_map(res$building, col = "#d9d0c9", border = "#c6bab1", lwd = .5, add = TRUE)
  mf_map(res$circle, col = NA, border = "#c6bab1", lwd = 4, add = TRUE)
}

## End(Not run)