Thank you Craig.
Actually I'm modeling the terrain for a game, I have many costs to
consider.
In example I have the visibility distance between players and the
reachability cost between them. The fastest route between two points
is usually different than the straight line.
I'm trying this model: geo locate players, and use spatial algorithms
on their positions to know who are their nearest enemies (this solves
partially the visibility problem). Then, on a terrain graph that
represents the cost to go from a location to another, I can calculate
the fastest route using an A* algorithm for every seen enemy.
This could work, I think.
Thank you again for your help.
On Apr 18, 12:00 am, Craig Taverner <
cr...@amanzi.com> wrote:
> Since you mention 'Neo4j Spatial', I thought perhaps I should comment.
>
> You said that a geo distance is only part of the total cost you need to
> consider. But if you can map your total cost space into a 2D (or perhaps 3D)
> space, then you could still use Neo4j-Spatial. The main problem I think you
> might have is that normally in a graph, you have costs between relations
> that do not produce a uniform space. For example, in a pure projected
> geographic space, if you go from A->B->C->A (cyclic loop) you really do get
> back to the same place (in terms of costs like x or y). But for other costs
> this might not be true. If it is true, then you can map the entire graph
> only one absolute space, you can certainly use Neo4j Spatial to do what you
> are after. Otherwise you need a clever approximation. If you already use geo
> in your cost, and it is an approximation, then perhaps your original idea is
> still valid (use geo first, then re-sort top-n on real costs later).
>
> Having said all this, I am also certain that there are graph algorithms for
> what you want, so a review of the spatial algos is probably your best bet.
>