[
https://issues.apache.org/jira/browse/SIS-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Desruisseaux updated SIS-51:
-----------------------------------
Fix Version/s: (was: 0.5)
> Pluggable Distance Calculation
> ------------------------------
>
> Key: SIS-51
> URL: https://issues.apache.org/jira/browse/SIS-51
> Project: Spatial Information Systems
> Issue Type: Improvement
> Components: Referencing
> Reporter: Peter Karich
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> The distance calculation is done in several places. I think it shouldn't be a
> static helper method instead it should be an instance which could be replaced
> by a more precise or faster calculations:
> double distance(double latFrom, double lonFrom, double latTo, double lonTo)
> E.g. one could use euclidean distance, haversine calculation or a fast
> projection calulation
> (https://github.com/karussell/GraphHopper/blob/master/core/src/main/java/de/jetsli/graph/util/ApproxCalcDistance.java
> + see test).
> Also one should think about "normed" distances. I mean, if one does not need
> the actual distance and rather needs to compare distances one could avoid
> parts of the distance calculation and make it faster. e.g.:
> sqrt(deltaX*deltaX + deltaY*deltaY) then gets: deltaX*deltaX + deltaY*deltaY
> and the comparisons of distances are still correct if done for all distances
> (eg. in a quad-tree). This could be done with a separate normedDistance
> method or probably just the same and a different implementation? Not sure ...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)