topoPathMap: Map of topographic paths

Description Usage Arguments Details Value Examples

View source: R/topoPathMap.R

Description

Plots a map of topographic paths on a landscape layer

Usage

1
2
3
4
topoPathMap(DEM, pts, topoPaths, type = "hillshade",
  costSurface = NULL, costColors = NULL, pathWidth = 2,
  pathColor = "darkred", alpha = 0.65, angle = 45, direction = 0,
  cex = 2, bg = "gray", col = "black", pch = 21, ...)

Arguments

DEM

A RasterLayer for digital elevation model (DEM) data.

pts

A SpatialPoints object or two-column matrix with xy coordinates for the geographic points from which to calculate pairwise distances and paths.

topoPaths

A SpatialLines object containing the topographic paths to be plotted.

type

character (default = "hillshade"). Type of map on which to plot topographic paths: "hillshade", "terrain", or "topo".

costSurface

(optional) A RasterLayer for the conductance (inverse of resistance) values for each cell.

costColors

(optional) A function that takes an integer argument (the required number of colors) and returns a character vector of colors (see rgb) interpolating the given sequence (similar to heat.colors or terrain.colors), such as the one returned by colorRampPalette.

pathWidth

numeric (default = 2). Width for drawing path line.

pathColor

character (default = "darkred"). Color for drawing path line.

alpha

numeric (default = 0.65). Alpha transparency for drawing path line.

angle

numeric (default = 45). Angle of lighting for hillshade maps, only (type = "hillshade").

direction

numeric (default = 0). Direction of lighting for hillshade maps, only (type = "hillshade").

cex

numeric (optional). Point size.

bg

character (optional). Background color for spatial points.

col

character (optional). Color for spatial points.

pch

numeric (optional). Shape of spatial points.

...

character, logical, or numeric (optional). Additional arguments to be passed to the plot function.

Details

The objects supplied for the DEM and pts arguments (and, optionally, costSurface) are generally those used to calculate the topographic paths using topoDist or topoLCP.

For the type argument, choosing "hillshade" will plot a shaded relief map, "terrain" will plot a map with terrain colors, and "topo" will plot a map with topo colors.

Optional arguments can be supplied to control the size (cex), shape (pch), and color (bg and col) of the points.

Value

Plot of topographic paths

Examples

1
2
3
4
5
xy <- matrix(ncol = 2, byrow = TRUE,
   c(-119.5566, 37.72474,
   -119.4718, 37.76078))
YosPaths <- topoDist(Yosemite$DEM, xy, paths = TRUE)
topoPathMap(Yosemite$DEM, xy, topoPaths = YosPaths)

topoDistance documentation built on Aug. 2, 2019, 5:05 p.m.