turf flip module
Takes input features and flips all of their coordinates
from [x, y]
to [y, x]
.
parameter | type | description |
---|---|---|
input |
Feature,FeatureCollection | input features |
var serbia = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [20.566406, 43.421008]
}
};
//=serbia
var saudiArabia = turf.flip(serbia);
//=saudiArabia
Returns Feature,FeatureCollection
, a feature or set of features of the same type as input
with flipped coordinates
Requires nodejs.
$ npm install turf-flip
$ npm test