Skip to contents

coast_var allows to filter the original intersections and select only the closest intersection between each transect and shoreline.

Usage

coast_var(shp, normals, table, position = "MIX", out_points, out_name)

Arguments

shp

Shapefile. A point format shapefile with the intersections between each transect and each shoreline.

normals

Shapefile. A polyline format shapefile with all normal lines (transects) included in the study site.

table

CSV. A table with the information about the coastlines dates in a column named "Day" in format (YYYYY-mm-dd). If the information about the acquisition hour is available, the user should introduce a column called "Hour" in format (HH:MM:SS) and the associated uncertainty to each coastline in meters. The column names should be "Day", "Hour" and "Uncertainty".

position

character. Default "MIX". position = "MIX" is recommended for use a coastline as baseline. The baseline position in relation to the coastlines. There are three options: "MIX" for intermediate baselines, "OFF" for offshore baselines, and "ON" for onshore baselines.

out_points

Integer. Output name for the filter intersection points shapefile.

out_name

Integer. Output name for the resulting shapefile with the rates of each transect.

Value

  • A shapefile with the filtered intersection points

  • A polyline shapefile with all rates associated to each transect.

  • A table in png format with the central tendency stats for each parameter.

Details

The coast_var is the main function included in this CoastCR version, as part of ODSAS (Gomez-Pazo et al., 2022). This function runs baseline_filter and coast_rates to doing the entire coastal change process. The first step filters the intersection points, to remove the duplicate points and selects the crossing that is closest to the baseline and neglects the others. The second step estimates the main coastal variation rates explained in detail in CoastCR documentation.

References

Gomez-Pazo, A., Payo, A., Paz-Delgado, M.V., Delgadillo-Calzadilla, M.A. (2022) Open Digital Shoreline Analysis System: ODSAS v1.0 Journal of Marine Science and Engineering, 10, 26.

Examples


#Load libraries
library(sf)
library(CoastCR)

#Intersections shapefile
shp <- st_read(system.file("extdata/intersect.shp", package = "CoastCR"))
#> Reading layer `intersect' from data source 
#>   `/home/runner/work/_temp/Library/CoastCR/extdata/intersect.shp' 
#>   using driver `ESRI Shapefile'
#> Simple feature collection with 264 features and 3 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 508058.2 ymin: 4674243 xmax: 508101 ymax: 4674329
#> Projected CRS: ETRS89 / UTM zone 29N

#Normal lines shapefile
normals <- st_read(system.file("extdata/normals.shp", package = "CoastCR"))
#> Reading layer `normals' from data source 
#>   `/home/runner/work/_temp/Library/CoastCR/extdata/normals.shp' 
#>   using driver `ESRI Shapefile'
#> Simple feature collection with 16 features and 7 fields
#> Geometry type: LINESTRING
#> Dimension:     XY
#> Bounding box:  xmin: 508009.1 ymin: 4674223 xmax: 508116 ymax: 4674330
#> Projected CRS: ETRS89 / UTM zone 29N

#Table with dates and associated uncertainty
table <- read.csv(system.file("extdata/table_coastlines.csv", package = "CoastCR"))

#Define baseline position. Offshore = OFF; Onshore = ON; Mixed = MIX.
position = "OFF"

#Define outputs names
out_points <- tempfile("int_filter", fileext = ".shp")
out_name <- tempfile("normals_rates", fileext = ".shp")

coast_var(shp, normals, table, position, out_points, out_name)
#> Writing layer `int_filter19916fb6903b' to data source 
#>   `/tmp/RtmpwOQn8r/int_filter19916fb6903b.shp' using driver `ESRI Shapefile'
#> Writing 128 features with 4 fields and geometry type Point.
#> Reading layer `int_filter19916fb6903b' from data source 
#>   `/tmp/RtmpwOQn8r/int_filter19916fb6903b.shp' using driver `ESRI Shapefile'
#> Simple feature collection with 128 features and 4 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 508058.2 ymin: 4674243 xmax: 508101 ymax: 4674329
#> Projected CRS: ETRS89 / UTM zone 29N
#> Writing layer `normals_rates19914d02019d' to data source 
#>   `/tmp/RtmpwOQn8r/normals_rates19914d02019d.shp' using driver `ESRI Shapefile'
#> Writing 16 features with 9 fields and geometry type Line String.