locationtech / jts

The JTS Topology Suite is a Java library for creating and manipulating vector geometry.
Other
1.94k stars 441 forks source link

Fix STRtree.nearestNeighbour to handle empty trees #882

Closed ashr123 closed 2 years ago

ashr123 commented 2 years ago

fixes #881

dr-jts commented 2 years ago

This needs unit tests - are you able to provide some?

Also, we should split the empty tree fix and the change in return value into two separate PRs, for tracking purposes.

ashr123 commented 2 years ago

@dr-jts can you provide the unit test? I've created the fix in the Github's editor and I didn't cloned it to my computer and I don't fully familiar with the code (as probably you are) and I agree with your proposal ablut splitting the PR. By the way, I think you can edit my PR with your unit test

dr-jts commented 2 years ago

I'd rather make this change in my dev environment, with unit tests at the same time. I will make a new PR for that, and then close this one.

dr-jts commented 2 years ago

Replaced by #886