# getGeom

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

> npm install @turf/invariant

参数

参数 类型 描述
geojson (Feature|Geometry) GeoJSON Feature or 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: 11/21/2022, 10:43:18 PM