cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Is there a way to set the X,Y,Z Position of a node

Newbie question: I am dealing with a graph where the XYZ position of a node is important. I am using py2neo to generate the graph. I can save and retrieve custom XYZ attributes, but I am wondering if there is a way to set the built-in PositionX, PositionY, PositionZ.

3 REPLIES 3

@wassim.jabi

Maybe I didn't get it your request, but I think this page is what you need.

That is, for example:

MATCH (n:Node {prop: 'value'}) SET n.pointProperty = point({x: 0, y: 4, z: 1}) AS point3D

Yes thank you. I need to set the point attribute. Now I need to know if there is a way to set the “point” attribute from py2neo call instead from a cypher statement. If you happen to know that, it would be great.

@wassim.jabi

Unfortunately, I've never used Python with Neo4j.
Anyway, I think this is the needed code:

https://neo4j.com/docs/api/python-driver/current/api.html#cartesianpoint