Hmm, yes, you're right - this is a bug.  The existing unit tests are pretty
sparse, and didn't cover this (obvious!) use case.

Will work on a fix ASAP...  or a patch is welcome.

At the moment I'm thinking that fixing this is going to need two traversals
of the tree to insert a node - one to do a tolerance-based search of all
matching subtrees, and then if not found a second non-tolerance-based
traversal to insert a new leaf node (in order to produce a deterministic
result).  But maybe these two can be combined.

On Mon, Jul 6, 2015 at 11:36 AM, Pepper, Jason <[email protected]> wrote:

>  The kd-tree does not correctly find existing nodes. It ignores branches
> that may contain matches within the tree’s threshold.
>
>
>
> To demonstrate this, create a kd-tree with a threshold of 1.0. Then add
> the following points (0.0, 0.0), (0.1, 1.0), and (-0.1, 1.0). The third
> point should be matched to the second point. However, the code ignores the
> right child of the root node and does not find the match.
>
>
>
>
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to