neo4j-contrib / spatial

Neo4j Spatial is a library of utilities for Neo4j that faciliates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial operations on the data like searching for data within specified regions or within a specified distance of a point of interest. In addition classes are provided to expose the data to geotools and thereby to geotools enabled applications like geoserver and uDig.
http://neo4j-contrib.github.io/spatial
Other
777 stars 191 forks source link

add function to convert neo4j native point(s) to WKT format #409

Open Andy2003 opened 1 month ago

Andy2003 commented 1 month ago

This PR adds a function spatial.convert.nativeToWkt to convert native points to WKT:

return spatial.convert.nativeToWkt(point({longitude: 1, latitude: 2})) as wkt

returns:

POINT ( 1 2 )

return spatial.convert.nativeToWkt([point({longitude: 1, latitude: 2}), point({longitude: 3, latitude: 4}) ]) as wkt

returns:

LINESTRING (1 2, 3 4)