downloadBasemap: Download basemap from Italian National Geoportal

View source: R/downloadBasemap.R

downloadBasemapR Documentation

Download basemap from Italian National Geoportal

Description

This function tries to download the aerial orthophoto of the requested domain from the Italian National Geoportal. The output is given in png format at the path given in the file parameter.

Usage

downloadBasemap(
  file = file,
  xSW = 410000,
  ySW = 5000500,
  xExt = 5000,
  yExt = 5000,
  crs = 32,
  width = 1024,
  height = 1024,
  units = "px",
  res = 72
)

Arguments

file

Path to output file.

xSW

South West Easting UTM coordinate of the basemap (in metres).

ySW

South West Northing UTM coordinate of the basemap (in metres).

xExt

Easting extension in metres.

yExt

Northing extension in metres.

crs

UTM Coordinate Reference System: either 32 or 33.

width

The basemap width.

height

The basemap height.

units

The unit of measure of width and height. It can be px (pixels, the default), ⁠in⁠ (inches), cm or mm

res

The resolution in dpi.

Value

No value is returned.

Examples

## Not run: 
# Download a basemap of a domain with SW coordinates (410000, 5000500) 
# in the UTM32 CRS and extension 5000m in both directions.

downloadBasemap(file = "./basemap.png", 
                xSW = 410000, ySW = 5000500, xExt = 5000, yExt = 5000)

# Download a basemap of a domain with SW coordinates (410000, 5000500) 
# in the UTM32 CRS and extension 5000m in both directions.
# The file has to be 2048 x 2048 pixels.

downloadBasemap(file = "./basemap.png", 
                xSW = 410000, ySW = 5000500, xExt = 5000, yExt = 5000, 
                width = 2048, height = 2048)
                
# Download a basemap of a domain with SW coordinates (410000, 5000500)
# in the UTM32 CRS and extension 5000m in both directions.
# The file has to be 10cm x 10cm with a resolution of 150 dpi.

downloadBasemap(file = "./basemap.png", 
                xSW = 410000, ySW = 5000500, xExt = 5000, yExt = 5000, 
                width = 10, height = 10, units = "cm", res = 150)

## End(Not run)

Simularia/simulariatools documentation built on Nov. 9, 2023, 12:36 p.m.