My goal is to find closest node by the given langitude and longitude. I have created Simple Point Layer and I'm using findClosestGeometies
query, but response times, even with relatively small databases, are rather unsatisfactory. Below operations I execute to create my layer:
:POST /db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer {
"layer" : "layerName",
"lat" : "NODE_LAT",
"lon" : "NODE_LON"
}
:POST /db/data/index/node {"name":"layerName", "config":
{"provider":"spatial", "geometry_type":"point", "lat":"NODE_LAT", "lon":"NODE_LON"}
}
match(n:WAY_NODE) set n.id=ID(n);
Then using simple java program I added ~70k nodes to the layer and run sample query:
:POST db/data/ext/SpatialPlugin/graphdb/findClosestGeometries {
"pointX" : 18.5640344020454,
"pointY" : 54.4441138296926,
"distanceInKm" : 1.0,
"layer" : "layerName"
}
It's working, but each response takes more or less 8 seconds. Is there a way to speed things up? Any ideas what should I use?