Compute the area and perimeter of a polygon at each vertex, showing how the measurements accumulate as vertices are added.
polygon_area_cumulative(x, polyline = FALSE)A two-column matrix or data frame of coordinates (longitude, latitude) in decimal degrees defining polygon vertices, or a list with longitude and latitude components.
Logical. If FALSE (default), compute area and perimeter of a closed polygon. If TRUE, compute only the length of a polyline (area will be meaningless).
A data frame with columns:
lon: Longitude of vertex
lat: Latitude of vertex
area: Cumulative area in square meters up to this vertex
perimeter: Cumulative perimeter in meters up to this vertex
This function is useful for understanding how polygon area accumulates and for debugging polygon vertex order issues.