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.

Complex Spatial Aggregation

mithun_das
Graph Buddy

I am struggling with a query...
I hv a simple query. I use Neo4j 4.0

MATCH (s:Station)-[:LOCATED_AT]->(l:Location)
WHERE distance(l.coord, point({ latitude: $latitude}, longitude: $longitude}})) < $distanceInMeter

please ignore any syntactical mistakes above if any.

now this successfully returns all the stations as per the WHERE statement.
But now my requirement is following ---
I want to return the count of stations when we hv a lot of stations within say a 1000 menter range and return individual station when there is no station other than 1 within the given 1000 menter range.
Initially I thought I will collect by distance but say a distance is 100 meter and a distance is 500 meter -> I want to collect both this as they are both < 1000 meter benchmark, what should i do for that?
Can anyone help?

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online