我正在使用 Neo4j 2.0 的空间服务器插件,并按照http://neo4j.github.io/spatial/上的指南添加了一个名为 Stockholm 的节点。
:POST http://localhost:7475/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
{
"layer" : "geom",
"lat" : "lat",
"lon" : "lon"
}
:POST http://localhost:7475/db/data/index/node/
{
"name" : "geom",
"config" : {
"provider" : "spatial",
"geometry_type" : "point",
"lat" : "lat",
"lon" : "lon"
}
}
:POST http://localhost:7475/db/data/node
{
"lat" : 60.1,
"lon" : 15.2,
"name" : "Stockholm"
}
:POST http://localhost:7475/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer
{
"layer" : "geom",
"node" : "http://localhost:7475/db/data/node/4"
}
我可以通过 REST 检索节点:
:POST http://localhost:7475/db/data/ext/SpatialPlugin/graphdb/findGeometriesWithinDistance
{
"layer" : "geom",
"pointX" : 15.0,
"pointY" : 60.0,
"distanceInKm" : 100
}
但不是下面的密码查询。这是为什么?我在这里做任何明显的错误吗?
START n=node:geom('withinDistance:[60.0,15.0, 100.0]') RETURN n;