spatial.addNativePointLayerWithConfig

Procedure

Adds a new native point layer with the given configuration, returns the layer root node

Signature

spatial.addNativePointLayerWithConfig(name :: STRING, encoderConfig :: ANY, indexType = rtree :: STRING, crsName =  :: STRING, indexConfig =  :: ANY) :: (node :: NODE)

Input parameters

Name Type Default Description

name

STRING

null

The name of the layer

encoderConfig

ANY

null

The configuration of the encoder that is used by layer to en-/decode the geometry of indexed nodes: a map by option name (see spatial.encoders.config) or a legacy string

indexType

STRING

"rtree"

The type of the index algorithm to be used, valid values are: rtree, geohash, zorder or hilbert

crsName

STRING

""

The CRS to be used, valid values are: wgs84

indexConfig

ANY

""

The configuration of the newly created index: a map by option name (see spatial.indexTypes.config) or a legacy string

Output parameters

Name Type Description

node

NODE

Examples

Create a native point layer with a configuration

CALL spatial.addNativePointLayerWithConfig('geom','pos:mbr','hilbert')
Table 1. Result
node
(:SpatialLayer {
    geomencoder: "NativePointEncoder",
    geomencoder_config.bboxProperty: "mbr",
    geomencoder_config.crs: "wgs84",
    geomencoder_config.locationProperty: "pos",
    index_type: "hilbert",
    layer: "geom",
    layer_type: "SimplePointLayer"
})