gadm.getBackground: Gets tiles with 'rosm' from OpenStreetMap

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/00_S3_Definitions.R

Description

Load tiles from OpenStreetMap create and save a .tif file with assembled tiles. The bounding box is automatically retrieved from the GADM shapefile passed as argument. The .tif file is stored in the working directory.

Usage

1
2
3
   gadm_getBackground(x, name, type="osm", clip=TRUE)

   gadm.getBackground(x, name, type="osm", clip=TRUE) # deprecated

Arguments

x

Object gadm_sf or gadm_sp (region that you want to add a background).

name

character the name of the TIFF file generated by this function. The .tif extension is automaticaly added.

type

Character type (default "osm') of the map provided by osm.types().

clip

boolean if TRUE (the default), background is clipped by the the external border of the spatial object. If FALSE, spatial object is drawn upper the background using the full bounding box.

Value

Object As input, gadm_sf or gadm_sp

Note

gadm.getBackground() is deprecated, it will be removed in the next release. Please use gadm_getBackground()

Author(s)

Jean Pierre Decorps <jp.decorps@epiconcept.fr>

See Also

osm.types

Examples

1
2
3
4
5
6
# library(GADMTools)
# library(rosm)
# FRA = gadm_loadCountries("FRA", 2, basefile = "./")
# BRE = GADMTools::subset(FRA, level=1, regions=c("Bretagne"))
# BRE2 <- gadm_getBackground(BRE, "BRE", "osm")
# plotmap(BRE2, title = "Map of Bretagne (FRANCE)")

GADMTools documentation built on Aug. 5, 2021, 1:06 a.m.