increase_polygon_vertices: Increase the Number of Vertices in a Polygon

View source: R/i.R

increase_polygon_verticesR Documentation

Increase the Number of Vertices in a Polygon

Description

This function interpolates additional vertices in a polygon data frame to increase its vertex density. It ensures that the polygon remains closed and that the new vertices are evenly distributed.

Usage

increase_polygon_vertices(polygon_df, avg_dist, skip = FALSE)

Arguments

polygon_df

A data frame representing the polygon, with columns for x and y coordinates.

avg_dist

The average distance between vertices after interpolation.

skip

Logical; if TRUE, the function skips the interpolation process and returns the original polygon.

Value

A data frame representing the polygon with increased vertex density.


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.