lawn_rewind | R Documentation |
Rewind (Multi)LineString or (Multi)Polygon outer ring counterclockwise and inner rings clockwise (Uses Shoelace Formula)
lawn_rewind(x, reverse = FALSE, mutate = FALSE, lint = FALSE)
x |
A data-FeatureCollection or data-Feature with Polygon, MultiPolygon, LineString, or MultiLineString |
reverse |
(logical) enable reverse winding. Default: |
mutate |
(logical) allows GeoJSON input to be mutated (significant
performance increase if true) Default: |
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: |
A data-FeatureCollection
x <- '{ "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]] ] } }' lawn_rewind(x, TRUE) lawn_rewind(x, mutate = TRUE) lawn_rewind(x, lint = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.