Open jx5c opened 8 years ago
No, that's what the method is supposed to return. Note the javadoc comments on the algorithm, the distance squared is used consistently throughout. Are you seeing unusual results in how the quad tree is functioning?
I did not see unusual results. I wanted to find some open-source Geographic applications for research purposes, and came across yours. I am reading and analyzing the source code.
For this part, what I am thinking is that
dx = ewdistance * ewdistance
dy = nsdistance * nsdistance;
seem already squared, why do we have dx*dx?
distanceSqr = dx * dx + dy * dy;
will make distanceSqr = ewdistance^4 + nsdistance^4. That seems different from the code in the old borderDistance function.
Jian
in QuadTreeRect.java file,
should the distanceSqr be dx+dy?