I have a class NodeA, annotated with @NodeEntity. It has many fields, including:
@Indexed
public Double lat;
@Indexed
public Double lon;
Note that NodeA is already capable of storing enough location information via lat and lon fields. I want to add nodes of type NodeA into a spatial layer, so that I can run spatial queries using GeoPipeline.
new Coordinate(13.766, 55.566)
into a spatial layer. (If there is no solution, how can I associate a NodeA node with its corresponding Coordinate node?) I am using:
Edit: When I connect an already existing node of type NodeA to the RTREE_ROOT, GeoPipeline complains about missing bbox property of the NodeA node. (Sure enough, there is no bbox property in NodeA, but it is present in other nodes of type Coordinate).
The blog Find Van Gogh’s artworks next to you, with Neo4j Spatial and Spring Data Neo4j 3.0.1
http://inserpio.wordpress.com/2014/04/03/artworks-spatial-search/
does exactly what I was looking for. @NodeEntity contains a wkt property, and Nodes are added to a SpatialRepository.