The fastest way to compute distance, or test for within distance, is to
index the segment and vertices ("facets") in a tree structure and use a
Branch-And-Bound algorithm to prune the tree based on distance between
facet envelopes.
There is an implementation of this in JTS:
http://sourceforge.net/p/jts-topo-suite/code/HEAD/tree/trunk/jts/java/src/com/vividsolutions/jts/operation/distance/IndexedFacetDistance.java
This doesn't yet have an isWithinDistance method, but if your LineStrings
are long it's probably worth using this. Note that it also maintains the
index for one of the geometries, so this can be used as a "Prepared"
operation.
On Thu, Nov 13, 2014 at 12:08 AM, Janda Martin <[email protected]> wrote:
>
>
> Is there better way how to detect whether Coordinate/Point and LineString
> is within distance? Is there any PREPARED DistanceOp? I have several
> LineStrings and huge amount of Coordinates.
>
>
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user