spatial.nodeAsWKT

Function

Returns a geometry of a layer node as WKT

Signature

spatial.nodeAsWKT(layerName :: STRING, node :: NODE) :: STRING

Input parameters

Name Type Default Description

layerName

STRING

null

The name of the layer is used to select the appropriate geometry encoder for extracting the WKT.

node

NODE

null

An indexed node to extract the WKT from

Examples

Converting a layer node to WKT

CALL spatial.addPointLayer('wkt_layer') YIELD node
WITH node
CREATE (n:Point {longitude: 10.0, latitude: 20.0})
WITH n
CALL spatial.addNode('wkt_layer', n) YIELD node as added_node
WITH n
RETURN spatial.nodeAsWKT('wkt_layer', n) as wkt
Table 1. Result
wkt

POINT (10 20)