lawn_unkinkpolygon: Unkink polygon

View source: R/unkinkpolygon.R

lawn_unkinkpolygonR Documentation

Unkink polygon

Description

Takes a kinked polygon and returns a feature collection of polygons that have no kinks.

Usage

lawn_unkinkpolygon(x, lint = FALSE)

Arguments

x

A data-FeatureCollection<(data-Polygon)> or data-FeatureCollection<(data-MultiPolygon)>

lint

(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Value

a data-FeatureCollection<(data-Polygon)>

Examples

x <- '{
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
      "coordinates": [[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]
   }
}'
lawn_unkinkpolygon(x)
view(x)
view(lawn_unkinkpolygon(x))

ropensci/lawn documentation built on May 18, 2022, 9:58 a.m.