[Dev] [spatial4j/spatial4j] ea9625: Fixed another geo circle/rect relate bug.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Dev] [spatial4j/spatial4j] ea9625: Fixed another geo circle/rect relate bug.

  Branch: refs/heads/master
  Home:   https://github.com/spatial4j/spatial4j
  Commit: ea9625cb3c3b2698d478a7a428540cb964acd7ef
  Author: David Smiley <[hidden email]>
  Date:   2013-11-22 (Fri, 22 Nov 2013)

  Changed paths:
    M src/main/java/com/spatial4j/core/shape/impl/CircleImpl.java
    M src/test/java/com/spatial4j/core/shape/TestShapesGeo.java

  Log Message:
  Fixed another geo circle/rect relate bug.

Couldn't use the proportions technique because of non-linear skew as you go north & south. If the rect crosses the x axis of the circle then it's necessary to check both corners because we can't reliably detect which is farthest.  Any way, the new logic is quite a bit clearer and still calls expensive contains() only 1.5 times or so (once or twice).

dev mailing list
[hidden email]