polygons_mutually_exclude: Make polygon input mutually exclusive (no overlaps) with...

View source: R/polygons_mutually_exclude.R

polygons_mutually_excludeR Documentation

Make polygon input mutually exclusive (no overlaps) with another

Description

Helper function to ensure that polygons (e.g. parks, beaches, informal nature areas) are mutually-exclusive (i.e. non-overlapping).

Usage

polygons_mutually_exclude(input, mutually_exclude, snap_tolerance = 0)

Arguments

input

sf object to process (with projected coordinate reference system).

mutually_exclude

sf object. input polygons contained within this object, and intersections between the two, will be removed. Should have the same coordinate reference system as input.

snap_tolerance

numeric. Argument for tolerance level passed to sf::st_snap(), used to rectify nearly coincident edges between polygons before running sf::st_contains(). Provided either as a units object (see units::set_units()), or a number in the units of the coordinate reference system. Defaults to 0.

Details

Polygons vertices first are snapped at a tolerance level based on snap_tolerance (if specified) to rectify nearly coincident edges, before removing input polygons contained in mutually_exclude. Intersections between the two are then removed.

Value

The processed input polygons (sf object).


ecological-cities/home2park documentation built on Dec. 6, 2023, 1:05 a.m.