Repository navigation
Conversation
| if (eleString != null) | ||
| ele = Double.parseDouble(eleString); | ||
| } | ||
| if (Double.isNaN(ele)) { |
There was a problem hiding this comment.
I'm not really happy with this fallback mechanic. We might end up mixing values from different height models.
If we want to support this, it's either tag based elevation or from an external provider.
Or to cite Ghostbusters: don't cross the streams
|
In the current form I also don't think this should be included in this repository. Mostly because it adds additional complexity as there are now two ways to read elevation. At the same time it can be easily done in a forked version of GraphHopper. But I also wonder if we should pass the public interface ElevationProvider {
default double getEle(ReaderNode node) {
return getEle(node.getLat(), node.getLon());
}
double getEle(double lat, double lon);
}So for @gberaudo's use-case one would only implement the first method (and maybe just throw an error for the second). But this won't work with the long edge-sampling, which has to be disabled in this case. So not entirely clean, but I also do not see a real reason why |
|
Regarding the
So the contract for |
|
Not entirely correct. The consensus is described in #2374 which aims to provide a better |
Draft implementation of the idea discussed in #2230 (comment).
TODO with questions:
mvn clean test verifypass as required by CONTRIBUTING.md (is there an easy way to set a breakpoint in OSMReader code?)