I'm trying to use the results from a withinDistance query in a second withinDistance.
I have 2 spatial indexes, Houses and POIs (Points of Interest). I'm trying to find houses which match certains parameters and then find POIs around each house.
This is what I have so far, but I don't know how to pass house.lon and house.lat as argument in the second withinDistance query
START house=node:Houses('withinDistance:[48.0,5.3,100.0]')
MATCH house ... // ... find Houses which match certain parameters
WITH house
START poi=node:POIs('withinDistance:[house.lon,house.lat,50.0]')
RETURN house.name, count(poi)
Bonus question: POIs are linked to POI_Type nodes, how can I return the count of POIs by type around each House?
Cheers :)