spatial.asGeometry

函数

返回一个几何对象,作为 Neo4j 的几何类型,可传递给其他函数或过程或返回给客户端

签名

spatial.asGeometry(geometry :: ANY) :: ANY

输入参数

名称 类型 默认 描述

几何

ANY

null

要转换的几何对象

示例

创建点几何

WITH point({latitude: 5.0, longitude: 4.0}) as geom RETURN spatial.asGeometry(geom) AS geometry
表 1. 结果
几何

point({x: 4.0, y: 5.0, crs: 'wgs-84'})

从映射创建点几何

WITH spatial.asGeometry({latitude: 5.0, longitude: 4.0}) AS geometry RETURN geometry
表 2. 结果
几何

point({x: 4.0, y: 5.0, crs: 'cartesian'})

© . This site is unofficial and not affiliated with Neo4j, Inc.