Learn R Programming

movecost (version 3.0.0)

movecost-data: Sample data bundled with movecost

Description

movecost 3.0 ships its sample datasets as standard GIS files (GeoTIFF and GeoPackage) read on demand by the accessor functions documented here. This frees the package data from any dependency on the retiring raster/sp stack used by movecost <= 2.x (whose .rda data files could not be loaded without those packages installed).

Usage

mc_volc()

mc_malta_dtm()

mc_volc_loc()

mc_destin_loc()

mc_springs()

mc_etna_start()

mc_etna_end()

mc_etna_boundary()

Arguments

Value

mc_volc() and mc_malta_dtm() return a

SpatRaster; all other accessors return an sf object.

Details

Available accessors:

  • mc_volc(): sample DTM (a volcano, Maungawhau/Mt Eden area; projected CRS, about 10 m resolution); SpatRaster.

  • mc_malta_dtm(): DTM of Malta (40 m resolution); its coastline NoData margin makes it the reference dataset for analyses on irregular DTMs; SpatRaster.

  • mc_volc_loc(): one start location on the volc DTM; sf.

  • mc_destin_loc(): nine destination locations on the volc DTM; sf.

  • mc_springs(): 49 springs on the Malta DTM; sf.

  • mc_etna_start(), mc_etna_end(): start and end locations in the Mt Etna area (Sicily), for use with online elevation download (mc_dtm); sf.

  • mc_etna_boundary(): study-area polygon for the Mt Etna area; sf.

Note on irregular DTMs: in movecost 3.0, NoData cells are excluded from the cost graph automatically, so least-cost paths on mc_malta_dtm() follow the coastline without any special setting (the irregular.dtm workaround of movecost <= 2.x is no longer needed).

Note on coordinate reference systems: the movecost <= 2.x datasets carried legacy proj4 definitions without authority codes; for version 3.0 they have been assigned the corresponding EPSG codes, which survive file round-trips identically across formats: volc and its locations EPSG:27200 (NZGD49 / New Zealand Map Grid), the Malta DTM and springs EPSG:23033 (ED50 / UTM 33N, matching the original International-ellipsoid UTM definition), the Etna datasets EPSG:23032 (ED50 / UTM 32N, as in the original definition). Coordinates are unchanged.

See Also

mc_surface, mc_dtm

Examples

Run this code
dtm <- mc_volc()
origin <- mc_volc_loc()
destinations <- mc_destin_loc()

# \donttest{
# the Malta DTM: paths cannot cross the sea (NoData cells)
malta <- mc_malta_dtm()
springs <- mc_springs()
surf <- mc_surface(malta, funct = "t", move = 8)
lcp <- mc_paths(surf, origin = springs[5, ], destin = springs[15, ])
plot(lcp)
# }

Run the code above in your browser using DataLab