# 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 可选参数:见下文

options选项

属性 类型 默认值 描述
mutate boolean false 允许修改GeoJSON输入(如果为真,性能将显著提高)

返回

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: 7/3/2023, 9:59:14 PM