spatial.addLayerWithEncoder
Procedure
Adds a new layer with the given encoder class and configuration, returns the layer root node
Signature
spatial.addLayerWithEncoder(name :: STRING, encoder :: STRING, encoderConfig :: STRING, indexConfig = :: STRING) :: (node :: NODE)
Input parameters
| Name | Type | Default | Description |
|---|---|---|---|
name |
STRING |
null |
The name of the layer |
encoder |
STRING |
null |
The name of the encoder to be used for the new layer |
encoderConfig |
STRING |
null |
The configuration of the encoder that is used by layer to en-/decode the geometry of indexed nodes |
indexConfig |
STRING |
"" |
The configuration of the newly created index |
Examples
Create a NativePointEncoder
CALL spatial.addLayerWithEncoder('geom','NativePointEncoder','')
| node |
|---|
|
Create a NativePointEncoder with a customized encoder configuration
Configures the encoder to use the nodes pos property instead of location
and the mbr property instead of bbox.
CALL spatial.addLayerWithEncoder('geom','NativePointEncoder','pos:mbr')
| node |
|---|
|
Create a NativePointEncoder with a customized encoder configuration using Cartesian coordinates
Configures the encoder to use the nodes pos property instead of location,
the mbr property instead of bbox and Cartesian coordinates.
CALL spatial.addLayerWithEncoder('geom','NativePointEncoder','pos:mbr:Cartesian')
| node |
|---|
|
Create a SimplePointEncoder
CALL spatial.addLayerWithEncoder('geom','SimplePointEncoder','')
| node |
|---|
|
Create a SimplePointEncoder with a customized encoder configuration
Configures the encoder to use the nodes x property instead of longitude,
the y property instead of latitude
and the mbr property instead of bbox.
CALL spatial.addLayerWithEncoder('geom','SimplePointEncoder','x:y:mbr')
| node |
|---|
|