Skip to content
On this page

翻转坐标顺序(flip)

js
npm install @turf/flip

传入features并将所有坐标从[x,y]翻转为[y,x]

Takes input features and flips all of their coordinates from [x, y] to [y, x].

参数

参数类型描述
geojson(Geometry/Feature)FeatureGeometry
optionsObject配置项

配置项(Options)

Prop类型默认值描述
mutatebooleanfalse允许GeoJSON输入被修改,如果为true性能将显著提高

返回(Returns)

GeoJSON - 一种或一组与输入相同类型的具有翻转坐标的feature

示例