0
votes

I created a simple graph model for hospitals. I am playing around with hiearchical trees in neo4j, so I created a multilevel location tree in graph.

enter image description here

Now I want to get GPS using apoc.spatial functions. Lets say that first 3 levels of locations are good enough for retrieving latitude and longitude. My query looks like this.

MATCH (h:Hospital)-[:IS_IN*..3]->(location)
CALL apoc.spatial.geocodeOnce(toString(collect(location.name))) YIELD location
set h += location

But this returns error since it does not support toString collections i guess.

Expected a String, Number or Boolean, got: Vector(550 OSBORNE ROAD, 55432, FRIDLEY)

What is the simplest way to achieve this to work ?

1
How did you manage to customise the Hospital, Ownership & Rating nodes?wikitect
Neo4j Browser settings --> enable experimental featuresTomaž Bratanič
The settings enable something or some features. How/what changes did you then define + display the custom node icon e.g. what changes to the grass file..?wikitect

1 Answers

2
votes

This should work

RETURN substring(reduce(s="", name in collect(location.name) | s + "," + name),1)