samplePoints: sample Points along the shoreline

View source: R/samplePoints.R

samplePointsR Documentation

sample Points along the shoreline

Description

Sample points along the coastline at specified intervals.

Usage

samplePoints(
  Coastline = NA,
  ShorelinePointDist = 200,
  BufferDist = 300,
  RadLineDist = 3
)

Arguments

Coastline

Coastline LINESTRING of class sf and data.frame.

ShorelinePointDist

Numeric. Spacing between cross-shore profile lines (meters). Note that it is recommended to keep this number as large as possible for your area of interest to speed up processing time.

BufferDist

Numeric. Buffer search distance (meters) used to identify the perpendicular angle of each cross-shore profile line from the coastline.

RadLineDist

Numeric. Radial line distance (kilometers) of the cross-shore profiles. This value determines how for offshore (and onshore) the cross-shore profiles should extend (recommended values are 1 - 3 km).

Value

A list object of shoreline points and cross-shore profile lines along the coastline.

Examples

## Not run: 
data(Coastline)
shoreline_points <- samplePoints(
  Coastline = Coastline,
  ShorelinePointDist = 150, # where to sample points on shoreline
  BufferDist = 300.0, # Buffer distance in meters for vertical line
  RadLineDist = 3.0 # Line dist in km
)
# Coastline
plot(sf::st_geometry(Coastline))
# Shoreline points
plot(sf::st_geometry(shoreline_points[[1]]), add=TRUE)
# Cross-shore profiles
plot(sf::st_geometry(shoreline_points[[2]]), add=TRUE)

## End(Not run)

essatech/MNAI.CPBT documentation built on July 1, 2023, 12:34 p.m.