Hi Angelo, Yes, certainly. The original design of Neo4j Spatial was specifically to support users keeping their own domain model, and there are several examples in the test cases of this. If your model matches some of the built in models, then you can just specify that model when you create the spatial layer. Otherwise you can write your own adapter (could be as simple as a dozen lines of code). The adapter tells the index how to interpret your model in a way that can be indexed.
See the following for further information: - The section titled 'Layers and GeometryEncoders' in the readme at https://github.com/neo4j/spatial - See some simple examples encoders at https://github.com/neo4j/spatial/tree/master/src/main/java/org/neo4j/gis/spatial/encoders - See example usage of these encoders in the test cases at https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/LayersTest.java#L155 Regards, Craig On Wed, Jan 15, 2014 at 4:18 PM, Angelo Immediata <[email protected]>wrote: > Hi Craig > > Thank you for replying me > > Regarding to Neo4j Spatial I thing I was not too much clear. I'm > interested in Neo4J Spatial and in all its all spatial functions; I'm not > too much worried about the addition of other nodes. What I didn't > understand when using Neo4J Spatial is if I can use my own graph structure > and add to the graph structure the spatial index; I would like to use my > own OSMImporter who will create my own Graph with Nodes and Relationships; > then I want to add spatial index to nodes (and maybe to relationship too); > in my scenario Nodes will be points and Relationships should be lines (I'm > still thinking to the addition of spatial index on relationships...for now > it's only an idea but I'm considering if I really need it) > So what I'ld like to do is: > > - use the embedded DB > - use my own osmimporter > - add spatial index to Nodes > - maybe add spatial index to Relationships > - use spatial functions provided by Neo4J Spatial > > > Do yuo think is this feasibile thing? If so....how can I use the spatial > index in order to index my own Nodes? > > Thank you > Angelo > > > Il giorno venerdì 10 gennaio 2014 09:34:08 UTC+1, Angelo Immediata ha > scritto: > >> Hi there >> >> I'm using this environment: >> >> - spring 3.2.6 >> - spring-data-neo4j 2.3.3 (I'm thinking to upgrade to the version 3 >> in order to have support for neo4j 2.0) >> - neo4j 1.9.5 >> >> >> I'm thinking to use neo4j in order to store our own graph that will be >> used in a route planner project. The first question is if this seems to you >> (sure more experts than me) a good solution in order to build a very good >> and efficient and performant route planner >> Moreover as far as I know (by reading this link >> http://docs.neo4j.org/chunked/1.9.5/graph-algo.html ) in neo4j these >> algorithms are implemented: >> >> - Shortest paths >> - all paths >> - all simple paths >> - Dijkstra >> - A* >> >> >> By reading this link http://docs.neo4j.org/chunked/ >> 1.9.5/rest-api-graph-algos.html I saw that REST API allows to call these >> algorithms: >> >> - Find all shortest paths >> - Find one of the shortest paths between nodes >> - Execute a Dijkstra algorithm with similar weights on relationships >> - Execute a Dijkstra algorithm with weights on relationships >> >> >> The second question is: can't I invoke the A* algorithm by REST API? This >> is related to the fact that I'ld love to have one (ore more) dedicated >> machine to neo4j and access to them by REST API (is this a good solution?) >> >> The last question regards neo4j performance. In my real scenario i may >> import an OSM file of an whole italian region (maybe also the full Italy); >> in the case of one region I can have around 10 millions of nodes (also more >> than 10 million) and some millions of relationship. In this case...what are >> performances with the built-in algorithms Dijkstra and/or A* when i want >> the shortest path (or all paths) between two points located at the end of >> the graph? >> >> Thank you >> Angelo >> > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
