You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussed in #209 but should happen on import and GPL code is really a no go and we cannot reuse the core method from this issue - we cannot even look into it.
The smoothing should happen on import e.g. could be here #507
Maybe it would make sense to host our own smoothed version of e.g. the SRTMV3 data. AFAIK, the best smoothing can be done with mdenoise. The smoothing process is very hardware intensive, smoothing the SRTM data of the whole world, might take weeks, depending on the input parameters of mdenoise. See for example this paget that shows the impact of iterations. However we have to test if smoothing solves our dem related issues.
Maybe it would also make sense to switch the elevation data source?
This is another issue: #384 and the mentioned link uses stuff where the license is not clear for all areas.
Maybe it would make sense to host our own smoothed version of e.g. the SRTMV3 data.
Yes, would love to see this (probably in the other issue) and we could provide processing power (for hosting I'm unsure as this requires other stuff). And then we can see if this helps improving here too.
for hosting I'm unsure as this requires other stuff
I could also host these on srtm.kurviger.de. I think the biggest problem here is to setup a workflow that does not run forever, but still provides better results than CGIAR and is repeatable (some sort of automation would be great).
I am not sure if this belongs here or into a new issue, but I think the reason for the following observations happens because of the missing smoothing.
Currently the ascend and descend are incorrect. Have a look at this route.
I have ridden this road many times, I don't know the exact ascend/descent, but there is not much descent if any (so Google Maps looks more correct to me).
In both cases the overall ascent-descent are pretty much the same, but the actual numbers differ. I am not sure if we actually need to smooth the elevation, but this would probably make the most sense?
BTW: I have also seen the parameter calc_mean, however, It doesn't seem to fix the issue if I understand this correctly?
I think the problem is not the smoothing it is more the precision of the elevation data which means that a cell of the higher areas overlaps the road and causes a big increase, see #384 for the related issue IMO.
I think the problem is not the smoothing it is more the precision of the elevation data which means that a cell of the higher areas overlaps the road and causes a big increase, see #384 for the related issue IMO.
But this would be also fixed if we smooth the elevation for every way? For example we could define a maximum steepness per vehicle profile. When calculating the ascend and descend in the PathMerger we could "smooth" the elevation data, which could remove the spikes.
There are three problems: gaps in the data (this is the reason we use CGIAR and not SRTM ala 90m), lack of precision (reason we should use SRTM ala 30m but there might be gaps although some sources say they are void filled, see #384) and lack of smoothing. I do not think that smoothing alone solves all issues but will help a lot. Also there is smoothing as a preprocessing step (will improve routing too) and smoothing per response (will be just cosmetic & improves the ascent&descent value but I do not like it much as it will make debugging harder)
I recently had a nice discussion with @dhowden and @tbillington regarding elevation smoothing. In contrast to the calcAverage method we currently use in the HeightTile we could try to create a Bézier surface (also see this link) from the hgt/tiff files.
The HeightTile would contain a formula (surface formula) that would return the height of a point for a given lat/lon instead of storing the height information for each cell of the grid.
The implementation is probably not straightforward and probably a solution like #1220 might be easier.
Activity
karussell commentedon Sep 15, 2015
As noted from @ratrun the GPL code was replaced with his own smoothing method - feel free to submit this here as separate issue.
ratrun commentedon Sep 15, 2015
I don't think that it is good idea to generally include my smoothing algorithm, which improved the calculation of the total ascend and the total descend. The reason is that it also changes the value of the start and the end point. This is totally fine for the computation of the total ascend/descend, because the absolute values are of no importance, but I don't think that it is a good idea to use it in general. The algortihm I used basically comes from here: http://phrogz.net/js/framerate-independent-low-pass-filter.html. I run it twice: once forward and once backward and then I take the mean average for each single point.
boldtrn commentedon Nov 6, 2016
Maybe it would also make sense to switch the elevation data source? It is possible to switch to 1 arc second data instead of 3 arc seconds, which might improve the data. For example there is the SRTMV3 data that is available in 1 arc second with filled holes. Also there are other sources like http://www.viewfinderpanoramas.org/ which is considered a high quality resource for dems.
Maybe it would make sense to host our own smoothed version of e.g. the SRTMV3 data. AFAIK, the best smoothing can be done with mdenoise. The smoothing process is very hardware intensive, smoothing the SRTM data of the whole world, might take weeks, depending on the input parameters of mdenoise. See for example this paget that shows the impact of iterations. However we have to test if smoothing solves our dem related issues.
karussell commentedon Nov 6, 2016
This is another issue: #384 and the mentioned link uses stuff where the license is not clear for all areas.
Yes, would love to see this (probably in the other issue) and we could provide processing power (for hosting I'm unsure as this requires other stuff). And then we can see if this helps improving here too.
boldtrn commentedon Nov 6, 2016
I found that issue after I commented here, sorry :).
Ah, you are right. I forgot about that.
I could also host these on srtm.kurviger.de. I think the biggest problem here is to setup a workflow that does not run forever, but still provides better results than CGIAR and is repeatable (some sort of automation would be great).
boldtrn commentedon Aug 14, 2017
I am not sure if this belongs here or into a new issue, but I think the reason for the following observations happens because of the missing smoothing.
Currently the ascend and descend are incorrect. Have a look at this route.
GraphHopper - ↗598m ↘316m, Google Maps - ↗296m ↘14m
I have ridden this road many times, I don't know the exact ascend/descent, but there is not much descent if any (so Google Maps looks more correct to me).
The same is true for this road: GH GM.
In both cases the overall ascent-descent are pretty much the same, but the actual numbers differ. I am not sure if we actually need to smooth the elevation, but this would probably make the most sense?
BTW: I have also seen the parameter
calc_mean, however, It doesn't seem to fix the issue if I understand this correctly?karussell commentedon Aug 15, 2017
I think the problem is not the smoothing it is more the precision of the elevation data which means that a cell of the higher areas overlaps the road and causes a big increase, see #384 for the related issue IMO.
boldtrn commentedon Aug 25, 2017
But this would be also fixed if we smooth the elevation for every way? For example we could define a maximum steepness per vehicle profile. When calculating the ascend and descend in the PathMerger we could "smooth" the elevation data, which could remove the spikes.
karussell commentedon Sep 2, 2017
There are three problems: gaps in the data (this is the reason we use CGIAR and not SRTM ala 90m), lack of precision (reason we should use SRTM ala 30m but there might be gaps although some sources say they are void filled, see #384) and lack of smoothing. I do not think that smoothing alone solves all issues but will help a lot. Also there is smoothing as a preprocessing step (will improve routing too) and smoothing per response (will be just cosmetic & improves the ascent&descent value but I do not like it much as it will make debugging harder)
boldtrn commentedon Sep 5, 2017
Is this included in the current master? I have seen an approach by @ratrun, but I think we didn't merge it into the master, right?
BTW: I also replied in #384 about the high precision data.
karussell commentedon Sep 5, 2017
no, see his comment: #517 (comment)
boldtrn commentedon Nov 20, 2017
I recently had a nice discussion with @dhowden and @tbillington regarding elevation smoothing. In contrast to the calcAverage method we currently use in the
HeightTilewe could try to create a Bézier surface (also see this link) from the hgt/tiff files.The HeightTile would contain a formula (surface formula) that would return the height of a point for a given lat/lon instead of storing the height information for each cell of the grid.
The implementation is probably not straightforward and probably a solution like #1220 might be easier.
boldtrn commentedon Jan 7, 2018
This should be close with #1220.