turf-reverse
Revert coordinates order for LineString
, Polygon
, MultiLineString
and MultiPolygon
features.
turf.reverse(feature)
Revert feature geometry coordinates order
Parameters
parameter | type | description |
---|---|---|
feature |
Object | GeoJSON feature |
Example
var reverse = ; var lineString = "type": "Feature" "properties": {} "geometry": "type": "LineString" "coordinates": 1000 00 1010 10 var lineStringReverse = ;//=lineStringReverse
Returns Object
, feature with reversed coordinates
Installation
Requires nodejs.
$ npm install turf-reverse
Tests
$ npm test