A comment about the three different spatial indexes you are considering:

   - Neo4j Spatial built-in RTree
   - Lucene
   - Write your own

Note that all three will use more disk space than not having an index. So
your concerns about Neo4j Spatial adding new nodes should consider that
there is no solution that will not use some disk space to store the index.
In neo4j spatial the RTree is stored in the graph, so new nodes are
created. The index is usually much smaller than the original data, so this
should not be a concern. If you write your own index, you could also do it
in the graph. Lucene stores the index separately, and has a more compact
format, so should use less space, but should not really matter.

If you use neo4j spatial and use the java api (embedded database), then you
have a very rich set of options for analysing data. Certainly distance
calculations are built-in because of the dependency on JTS and Geotools.
Geotools in particular supports the calculations in any projection.

If you use lucene of write your own index, you could separately depend on
JTS and Geotools if you want.


On Tue, Jan 14, 2014 at 5:09 PM, Angelo Immediata <angelo...@gmail.com>wrote:

> Hi there
>
> I'm coming back to this post becouse I have some more questions and I
> guess you expert can help me in figuring them
> In my scenario I have a graph where properties on relationship can vary
> rapidly; so this means that I can't use pre-computation algorithms (like
> Contratcion Hierarchy) when I need to calculate the route between a source
> and a target; so actually I can only use the A* algorithm that should be
> faster than Dijkstra
> But since my one is a route planner software I need to provide to the
> graph also some "spatial" functions (e.g. find the closest point to the
> point with coordinate A and B and others...)
> At the beginning I wanted to use Neo4j Spatial but it seems to me (but I
> may be wrong) that it adds some nodes more to the original nodes in order
> to add Layers and so on....I'ld like only to use a spatial index to index
> my own nodes (and maybe relationships) and than do spatial queries;
> moreover I saw that lucene 4 has Spatial APIs so I'ld like to ask:
>
>    - is what I'm thinking and described here feasible according to yuo?
>    - is there a roadmap where lucene version will be upgraded from 3.x to
>    4.x
>    - if lucene is upgraded to 4.x, is there any possibility to add a
>    Spatial Index so that I can use it in order to index my own nodes and
>    relationships? (In my scenario Nodes will be Points and Relationships will
>    be Lines)
>    - In the workst case....can I create my own "spatial index" and add it
>    to Neo4J? In this case how can I add functions to Neo4J (e.g. find closest
>    point to coordinates)
>
> Note that now I upgraded my Neo4J version from 1.9.5 to 2.0
>
> 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 neo4j+unsubscr...@googlegroups.com.
> 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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to