# flip

Takes input features and flips all of their coordinates from [x, y] to [y, x].
取输入的Feature并翻转它们的所有坐标从[x, y][y, x]

参数

参数 类型 描述
geojson GeoJSON input features
options Object Optional parameters: see below

options选项

属性 类型 默认值 描述
mutate boolean false allows GeoJSON input to be mutated (significant performance increase if true)

返回

GeoJSON - a feature or set of features of the same type as input with flipped coordinates

示例

var serbia = turf.point([20.566406, 43.421008]);

var saudiArabia = turf.flip(serbia);
Last Updated: 1/19/2021, 10:59:20 AM