spatial.addPointLayerWithConfig

Procedure

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

Signature

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

Input parameters

Name Type Default Description

name

STRING

null

The name of the layer

encoderConfig

STRING

null

The configuration of the encoder that is used by layer to en-/decode the geometry of indexed nodes

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

STRING

""

The configuration of the newly created index

Output parameters

Name Type Description

node

NODE

Examples

Create a point layer with X and Y properties

CALL spatial.addPointLayerWithConfig('geom','lon:lat')
Table 1. Result
node
(:SpatialLayer {
    geomencoder: "org.neo4j.gis.spatial.encoders.SimplePointEncoder",
    geomencoder_config: "lon:lat",
    index_class: "org.neo4j.gis.spatial.index.LayerRTreeIndex",
    layer: "geom",
    layer_class: "org.neo4j.gis.spatial.SimplePointLayer",
    layercrs: "GEOGCS[\"WGS84(DD)\", \n  DATUM[\"WGS84\", \n    SPHEROID[\"WGS84\", 6378137.0, 298.257223563]], \n  PRIMEM[\"Greenwich\", 0.0], \n  UNIT[\"degree\", 0.017453292519943295], \n  AXIS[\"Geodetic longitude\", EAST], \n  AXIS[\"Geodetic latitude\", NORTH], \n  AUTHORITY[\"EPSG\",\"4326\"]]"
})