Marcin, look at https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSimplePointLayer.java#L42 where data is added to the SimplePointLayer, specifying that the lat/lon should be encoded into "Longitude/Latitude" properties on the geometry node.
For adding existing data to the layer, look at https://github.com/neo4j/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/server/plugin/SpatialPlugin.java#L98 - you are adding an existing node with the right lon/lat properties to the layer, using the specified GeometryEncoder at Layer setup time. I did an example of this in the functional tests, see https://github.com/neo4j/spatial/blob/master/features/start-and-stop.feature#L10 where a layer is created (assuming "lon/lat/bbox" per default as the geometry nodes properties to be used for indexing, then a raw node is created, then the nodes is added to the layer and indexed, and then you can search for it in different permutations (REST, Gremlin, Cypher, Neo4j Index) Does that help? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Oct 11, 2011 at 6:59 PM, Marcin Zpa <[email protected]> wrote: > Hi Peter, > thanks a lot for your quick feedback. What do you mean with skipping > encoding step? That means that i could directly index my domain > coordinate node and do not create any additional "geo" nodes. Sorry if > you find this question stupid or obvious but i cant follow your > suggestion. For me important thing is that after invoking search i > want to somehow get back from results provided as > SpatialDatabaserecord to domain nodes as for example user. > > Thanks in advance! > > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Mapping-domain-graph-to-spatial-layer-tp3409159p3413184.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

