Github user iverase commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/246#discussion_r138556038
--- Diff:
lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dDistanceCalculator.java
---
@@ -70,7 +71,22 @@ public boolean within(Point from, double toX, double
toY, double distance) {
@Override
public Point pointOnBearing(Point from, double distDEG, double
bearingDEG, SpatialContext ctx, Point reuse) {
- throw new UnsupportedOperationException();
+ double dist = DistanceUtils.DEGREES_TO_RADIANS * distDEG;
+ double bearing = DistanceUtils.DEGREES_TO_RADIANS * bearingDEG;
+ Geo3dPointShape geoFrom = (Geo3dPointShape) from;
+ GeoPoint point = (GeoPoint)geoFrom.shape;
+
--- End diff --
I have changes the formula to use vincenty's formulae. Slower as it is
iterative but It taken into account the planet model.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]