3.0.12 • Published 9 years ago

turf-flip v3.0.12

Weekly downloads
11,363
License
MIT
Repository
github
Last release
9 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

9 years ago

3.0.10

9 years ago

3.0.5

9 years ago

3.0.1

9 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.1.2

11 years ago

0.1.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago