[SoC] GSoC Neo4j Spatial Cypher Week 6 Report

William Lyon lyonwj at gmail.com
Tue Jul 1 06:50:43 PDT 2014


Full Week 6 report for Neo4j Spatial Cypher project is available here: https://github.com/johnymontana/neo4j/wiki/week6


What did I get done with week?

* Added RegisteredLayerType class as provided by Craig. This allows for creation of Spatial Layer by specifying only a string, rather than dealing with the more complex Java API for creating Spatial Layers (and specifying a GeometryEncoder class). (Initially only SimplePointLayer type)

 *Implemented spatialCreateLayer function. This function takes two strings as arguments, the layer name and a string specifying the layer type (as described above).

* Implemented spatialAddNode function. This function takes a Node and the layer label and adds the Node to that Spatial Layer.

* Added tests to test these new functions and RegisteredLayerType method of creating Spatial Layer with Java API.

This allows for Cypher queries like this (taken from one of the tests I added this week): 

CREATE (n1:SomeLayer) WITH spatialCreateLayer("SomeLayer","SimplePoint") as layer
CREATE (n2:SomeLayer {lat: 34.221, lon: 46.221, name: "node2"}) WITH spatialAddNode(n2, layer) as node2, layer
CREATE (n3:SomeLayer {lat: 34.221, lon: 46.221, name: "node3"}) WITH spatialAddNode(n3, layer) as node3, layer, n3
CREATE (n4:SomeLayer {lat: 21.341, lon: 96.122, name: "node4"}) WITH spatialAddNode(n4, layer) as node4, layer, n3
MATCH (n:SomeLayer) WHERE Intersects(n, n3) RETURN n.name as n
// n -> "node2"
// n -> "node3"


What will I accomplish next week?

* Update layer types in RegisteredLayerType class to allow for creation of layers of different types (other than just SimplePointLayer)
* Review PostGIS functionality with comparison of subset provided in first version of Spatial Cypher


Am I blocked on anything?

No.


Will Lyon
lyonwj.com
@lyonwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/soc/attachments/20140701/a3bab53f/attachment.html>


More information about the SoC mailing list