# getGeom

Get Geometry from Feature or Geometry Object
从Feature或几何对象获得几何对象

> npm install @turf/invariant

参数

参数 类型 描述
geojson (Feature|Geometry) GeoJSON Feature 或 Geometry Object

返回

(Geometry|null) - GeoJSON Geometry Object

示例

var point = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Point",
    "coordinates": [110, 40]
  }
}
var geom = turf.getGeom(point)
//={"type": "Point", "coordinates": [110, 40]}
Last Updated: 4/10/2024, 11:27:54 PM