Learn R Programming

rLakeHabitat (version 1.0.0)

contourPoints: Contour Lines to Points

Description

Get point coordinates and depth values along predetermined contours at a specified density.

Usage

contourPoints(object, depths = NULL, geometry = "geometry", density = 10)

Value

dataframe of coordinates and associated depths

Arguments

object

polygon or multipolygon shapefile (.shp) with depths included as an attribute column. Can be an sf or spatVector object.

depths

character string describing column name of depth attribute

geometry

character string describing column name of geometries. Default = "geometry"

density

numeric value describing distance between points in meters, default = 10m

Author

Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming

Examples

Run this code
# load test data
data <- sf::read_sf(system.file("extdata", "example_contour.shp", package = 'rLakeHabitat'))
#run function
contourPoints(data, depths = "Z", geometry = "geometry", density = 50)

Run the code above in your browser using DataLab