3.0.12 • Published 8 years ago

turf-flip v3.0.12

Weekly downloads
11,363
License
MIT
Repository
github
Last release
8 years ago

turf-flip

build status

turf flip module

turf.flip(input)

Takes a GeoJSON object of any type and flips all of its coordinates from [x, y] to [y, x].

Parameters

parametertypedescription
inputGeoJSONinput GeoJSON object

Example

var serbia = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Point",
    "coordinates": [20.566406, 43.421008]
  }
};

//=serbia

var saudiArabia = turf.flip(serbia);

//=saudiArabia

Returns GeoJSON, a GeoJSON object of the same type as input with flipped coordinates

Installation

Requires nodejs.

$ npm install turf-flip

Tests

$ npm test
3.0.12

8 years ago

3.0.10

8 years ago

3.0.5

8 years ago

3.0.1

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.2

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago