Learn R Programming

spsurvey (version 4.1.4)

insideAreaGridCell: Calculate Clipped Feature Areas in a Set of Grid Cells

Description

For each grid cell, this function calculates the clipped area of each polygon feature contained in the cell.

Usage

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

Arguments

sfobject

The sf polygon 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, featureArea, and featureID.