st_no_overlap: Non-overlapping polygons using Voronoi tesselation

View source: R/st_no_overlap.R

st_no_overlapR Documentation

Non-overlapping polygons using Voronoi tesselation

Description

This function takes a set of polygons and returns a new set of polygons where the buffer zones of the original polygons do not overlap with each other. This is achieved by calculating the centroids of the polygons, creating a Voronoi tesselation around the centroids, and intersecting the Voronoi zones with the buffer zones of the original polygons. The resulting polygons do not overlap with each other, ensuring that they can be used for further analysis or visualization. Inspired by this post

Usage

st_no_overlap(polygons)

Arguments

polygons

A set of polygons with attributes.

Details

This function uses the sf package to calculate the centroids of the polygons using the st_centroid function, and to create a Voronoi tesselation around the centroids using the st_voronoi function. The Voronoi zones are then intersected with the buffer zones of the original polygons using the st_intersection function. The resulting polygons are returned with their original attributes.

Value

A set of polygons with attributes where the buffer zones of the original polygons do not overlap with each other.


baslat/sak documentation built on April 14, 2025, 4:14 p.m.