Learn R Programming

bcmaps (version 1.2.0)

fix_geo_problems: Check and fix polygons that self-intersect, and sometimes can fix orphan holes

Description

[Deprecated].

This function is deprecated as of bcmaps 1.2.0 because it relies on rgeos for operations on Spatial objects, which is being retired. It will be removed completely in Summer 2023. For sf objects simply use sf::st_make_valid()

Usage

fix_geo_problems(obj, tries = 5)

Value

The SpatialPolygons* or sf object, repaired if necessary

Arguments

obj

The SpatialPolygons* or sf object to check/fix.

tries

The maximum number of attempts to repair the geometry. Ignored for sf objects.