Learn R Programming

crawl (version 2.2.0)

get_mask_segments: Identify segments of a path that cross through a restricted area

Description

This function is used to identify sections of a path that pass through a restricted area (e.g. for marine mammals or fish, a land mask). the CTCRW model in crawl cannot actively steer paths away from land. So, this function will identify path segments from the unrestrained path that pass through these areas. If the path/points end within the land area, those records will be removed. The user can then use this information to adjust the path as desired.

Usage

get_mask_segments(crw_object, vector_mask)

Arguments

crw_object

A crwIS object from the crawl package

vector_mask

A sf object from sf package that indicates restricted areas as a polygon feature.

Value

A data.frame with each row associated with each section of the path that crosses a restricted area. The columns provide the start and end row indices of xy where the section occurs and the previous and post locations that are in unrestricted space.