Repository navigation
Conversation
|
ratrun@5b516fa adds calculation of a waytype summary information for bicycles. |
|
What do you mean with 'to smooth the input elevation data'?
|
|
Thanks for the feedback. Please have a look to the changes made. I have tackled every issue mentioned except for the last one: "don't use special chars for i18n. use include/decline or similar instead". I believe that the special characters "↑" and "↓" have following advantages compared to some verbal expressions:
Therefore I would like to keep this if possible. With "smothing" the input elevation data I mean that I don't sum up elevation differences smaller to 15 meters and also neglect differences bigger than 100 meters. Without the first we get an noteable ammount of incline/decline meters even in totally flat areas, the other one is a kind of plausability check for rather bad SRTM elevation data. |
Sure but they are hard to write :). Also now that we have encoder.getDouble this might be more suitable than introducing more methods for this. |
|
It is hard to include a big issue - but I would really like to have the overall incline and decline. Would you mind separating them from the rest of this issue? E.g. smoothing is now done when reading from SRTM data, also we can now read CGIAR which provides better elevation data. |
fbd35c8 to
af16fba
Compare
|
After a long break I included the suggestion. Now the pull request contains only ascend and descend calculation as suggested. My tests showed that the elevation low pass filtering on reading SRTM is still not sufficient for calculating an overall ascend and descend. See https://graphhopper.com/maps/?point=48.079914%2C15.968628&point=47.995436%2C16.387482&vehicle=bike&elevation=true&layer=Omniscale |
|
Thanks for taking the time again! Would still love to see two issues :) For this PR I would like to avoid mixing this bike specific info in the general translation info. Please create two new translation keys e.g. "ascent %$1" and "descent %$1". Furthermore the GHResponse now contains a hints field where I currently would like to prefer the values as they are not usable for all vehicles. Thanks for the link too, interesting read. |
|
I do not see a reason why separating the filtering would bring benefits. I know that without the filtering the calculated results are worse compared with the filtering. What do you fear? The filtering is only used for the calculation of the ascend and descent, so it cannot destroy/influence any existing functionality. Therefore I would like to keep it included. As you again suggested usage on the translation keys I will create them. I had hoped that you forgot about it in the meantime ;) I think that I understood the hints field on the java side. But I do not understand your plan for the java script side. Here I only found the usage as an error indication in this line: main.js#L982 Could you please provide some more hints for the hints usage on the java script client side? I problably overlooked something. |
|
I would like to have this feature and feel the smoothing is not ready. But with 'not ready' I more mean that it could be applied in more scenarios like while import so that not only bike benefits.
I don't like to have it in an inconsistent manner. Smoothing should be done earlier if it is of an advantage. Re the translation key: do not include the english translation, just provide EN (+DE) and the other languages fall back to english. I can do this, plus the JS side (when I finally find a bit time ;() |
|
I didn't know about the automatic Engish language fall-back. I removed all the translation strings (except EN+DE) as proposed. With a heavy heart I also included the requested elimiation of the smoothing. Now the patch is quite small. Please note following commented test lines in GraphHopperIT.java: This is the testresult without the smoothing: for In case that you really want to have it this way, then I'll make one more commit and delete the two commented test results. I don't think that this change is bike/foot related. The results are also of interest for other vehicles, even for car. |
|
Thanks, will look into it next week and add the JS where necessary!
But please not without creating a new separate issue with the smoothing only :) I want to highlight that I don't criticize you or anything, it is even the opposite that GraphHopper lives from many such improvements with this 'love for the detail'. Now for this case I just wanted to make sure that two independent issues get its own dedicated discussion and improvement. Also having smaller pull requests makes it easier to review, integrate, test and deploy. |
There was a problem hiding this comment.
I would avoid creating a new array here, instead pass fullPoints directly to calcAscendDescend
As the smoothing will happen on import (and done in a separate issue). BTW: see also #507 where this then should be placed
|
@ratrun As I just saw the commit where you noted the GPL code for smoothing: would you please just provide a single commit for the ascend+ascend stuff without any smoothing? This is really important to keep GraphHopper free of licensing issues. |
|
I used the GPL code just for experiments and replaced it later, no part of it is active any longer. I'll try to combine the changes into a single commit. |
|
Okay, thanks! Just for the future: commiting GPL code into the repository should not be done. Also when looking for inspiration (aka implementing) then GPL code must not be used. |
|
I'm sorry for the troubles. Now I think that I have tackled every comment. Please take a look. As suggested I didn't try to implement the JS hint stuff. |
|
Sorry for pinging here again. Can you provide just one commit where the commits where you eliminated code are removed? |
|
I'm still sometimes struggling with git. Is it OK now? |
|
Thanks and no problem :) To avoid the merge commits you should do |
|
Please have a look into my changes. I added the translation stuff to the google doc and made an automatic update of the translation files, so there are these many changes. But actually we don't need this due to the simple arrows I use in the web UI. Let me know if you think we should remove the text or keep it. Also we should document the descend and ascend in the web docs |
|
Thank you. Looks good. As said, I totally agree to get rid of the translation stuff. I always wanted to have it that way and only included the translation keys because you insisted on them. But this is much more easy to understand in every language. Now there is only one major problem: the missing smoothing and my algorithm, which cannot be used for smoothing during reading, because it messes up every start and end elevation. Do you already have an idea how to solve this? I think that a good 2D smoothing algorithm should have all evlevation data for every point available. When you do the smoothing during reading then I beleive that one probably needs a 3D smoothing algorithm. Anywhow, 3D smoothing is beyond my mathematical skills. |
|
Ok, I'll get rid of the translations ... re the smoothing: let us discuss this in the other issue. |
|
Hmmh, the translations are useful for navigational purposes .. I'll keep it but'll remove the 'web' prefix |
|
Is now also deployed. |
in order to smooth the input elevation data, which currently sometimes is not smooth at all.