rewind: rewind

Description Usage Arguments Details Value Examples

View source: R/rewind.R

Description

rewind

Usage

1

Arguments

x

A geojson object, either as list, character string, or json class

outer

(logical) clockwise (TRUE, default) or counterclockwise (FALSE)

Details

ported from geojson-rewind JS library at https://github.com/mapbox/geojson-rewind

Value

a geojson object, as json/character class

Examples

1
2
3
4
5
6
7
8
x <- '{
 "type":"Polygon",
 "coordinates":[
   [[100.0,0.0],[100.0,1.0],[101.0,1.0],[101.0,0.0],[100.0,0.0]]
 ]
}'
rewind(x)
rewind(x, outer = FALSE)

ropenscilabs/geojsonrewind documentation built on July 25, 2018, 10:37 p.m.