Learn R Programming

spsurvey (version 4.1.4)

insideLinearGridCell: Calculate Clipped Feature Lengths in a Set of Grid Cells

Description

For each grid cell, this function calculates the clipped length of each linestring feature contained in the cell.

Usage

insideLinearGridCell(sfobject, rdx.u, xc, yc, dx, dy)

Arguments

sfobject

The sf linestring object.

rdx.u

Vector of cell IDs.

xc

Vector of x-coordinates for the grid cells.

yc

Vector of y-coordinates for the grid cells.

dx

The x-axis grid cell dimension.

dy

The y-axis grid cell dimension.

Value

Data frame containing the following variables: cellID, featureLength, and featureID.