Learn R Programming

lawn (version 0.6.0)

lawn_unkinkpolygon: 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

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

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataLab