spatial.addPointLayerGeohash
过程
添加一个基于 geohash 索引的新简单点图层,返回该图层的根节点
签名
spatial.addPointLayerGeohash(name :: STRING, crsName = wgs84 :: STRING, indexConfig = :: STRING) :: (node :: NODE)
输入参数
| 名称 | 类型 | 默认 | 描述 |
|---|---|---|---|
名称 (name) |
STRING |
null |
层的名称 |
crsName |
STRING |
"wgs84" |
要使用的坐标参考系统(CRS),有效值为: |
indexConfig |
STRING |
"" |
新创建的索引的配置 |
示例
创建一个用于索引节点的图层
CALL spatial.addPointLayerGeohash('my-simple-geohash-layer')
| 节点 |
|---|
|
创建要索引的节点
CREATE (n:Node {id: 42, latitude:60.1,longitude:15.2}) SET n.location=point(n) RETURN n
索引节点
MATCH (n:Node) WITH n CALL spatial.addNode('my-simple-geohash-layer',n) YIELD node RETURN node
| 节点 |
|---|
|
在指定距离内查找节点
CALL spatial.withinDistance('my-simple-geohash-layer',{lon:15.0,lat:60.0},100)
| 距离 | 节点 |
|---|---|
|
|