The distance is calculated best using JTS. For example:
double distance = pointA.distance(pointB)

See
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html#distance(com.vividsolutions.jts.geom.Geometry)

On Tue, Sep 23, 2014 at 3:26 PM, Alireza Rezaei Mahdiraji <
alireza...@gmail.com> wrote:

>
> Hi All,
>
> Given two geometries how do compute the distance between
> them in neo4j spatial? For instance given two points stored in two nodes?
>
> What other kind of distance are defined? For instance, is it possible to
> find
> distance between a point and a linestring/polygon or distance between two
> polygons?
>
> Related to the concept of distance, it is possible to find objects within
> a given distance of a
> given object. But what about computing knn, i.e., finding k elements which
> are closets to the
> given object? Shall we compute all distances and then pick top k or there
> is implemented
> and optimized way to do this?
>
> Thanks,
> Best,
> Alireza
>
> --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to