spatial.asGeometry

Function

Returns a geometry object as the Neo4j geometry type, to be passed to other functions or procedures or returned to a client

Signature

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

Input parameters

Name Type Default Description

geometry

ANY

null

The geometry to convert

Examples

Creates a point geometry

WITH point({latitude: 5.0, longitude: 4.0}) as geom RETURN spatial.asGeometry(geom) AS geometry
Table 1. Result
geometry

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

Creates a point geometry from a map

WITH spatial.asGeometry({latitude: 5.0, longitude: 4.0}) AS geometry RETURN geometry
Table 2. Result
geometry

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