spatial.cql

过程

查找给定图层中匹配指定 CQL 的所有几何节点

签名

spatial.cql(layerName :: STRING, ecql :: STRING) :: (node :: NODE)

输入参数

名称 类型 默认 描述

图层名称

STRING

null

层的名称

ecql

STRING

null

用于查找/过滤该图层节点的 [ECQL](https://docs.geoserver.org/latest/en/user/filter/ecql_reference.html)

输出参数

名称 类型 描述

节点

NODE

示例

使用 CQL 查找几何体

CALL spatial.addWKTLayer('geom','wkt') YIELD node
表 1. 结果
节点
(:SpatialLayer {
    geomencoder: "WKTGeometryEncoder",
    geomencoder_config: "wkt",
    index_type: "rtree",
    layer: "geom",
    layer_type: "EditableLayer"
})

创建并添加具有不同坐标的节点

CREATE (n1:Node {wkt: 'POINT(15.2 60.1)', name: 'point1'})
CREATE (n2:Node {wkt: 'POINT(25.2 30.1)', name: 'point2'})
WITH n1, n2
CALL spatial.addNode('geom', n1) YIELD node as added1
WITH n2, added1
CALL spatial.addNode('geom', n2) YIELD node as added2
RETURN added1, added2
CALL spatial.cql('geom', 'name = \'point1\'') YIELD node RETURN node.name as name
表 2. 结果
名称 (name)

point1

© . This site is unofficial and not affiliated with Neo4j, Inc.