If the only query you need to complete is Get Your Nearest Place, using R-Tree might not be the best choice. I could think of two alternatives:
- Calculate the distance to each place using the Garveyne formula and find the minimum distance. If you have too many coordinates, this might be the best solution. See " Finding proximity " for more information.
- Use a data structure that allows you to search for the nearest coordinates, such as KD-Tree . Please note that the KD-Tree implementation in NetTopologySuite is not suitable for your use.
source share