View source: R/downloadBasemap.R
downloadBasemap | R Documentation |
Download the aerial orthophoto of the requested domain from the Italian National Geoportal.
downloadBasemap(
file = file,
xSW = NA,
ySW = NA,
xExt = NA,
yExt = NA,
crs = 32,
width = 1024,
height = 1024,
units = "px",
res = 72
)
file |
Path to output file. If file exists, it will be overwritten. |
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 |
Coordinate Reference System as UTM zone: either 32 (default) or 33. |
width |
The basemap width (default = 1024). |
height |
The basemap height (default = 1024). |
units |
The unit of measure of width and height.
It can be |
res |
The resolution in dpi (default = 72). |
The domain is specified by the South-West point coordinates, and its
extension in the x
and y
directions.
The Coordinate Reference System (CRS) is in UTM 32 or 33.
Note that, even if the downloading is successful the file might be empty due to some weird behaviour of the remote server from the PCN.
The output is a tiff encoded with GeoTIFF
metadata at the path
provided. No value is returned.
## 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.tif",
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.tif",
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.tif",
xSW = 410000, ySW = 5000500, xExt = 5000, yExt = 5000,
width = 10, height = 10, units = "cm", res = 144
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.