-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elevation raster generation (*.bef files) #644
Conversation
Thanks for your work, as I only proposed the changes but currently lack the time to do any work. I hope I can find some time to review your changes this week. I remember @abrensch stating that he didn't find improvements in elevation accuracy by using the 1asec files compared to 3asec. Did you notice any improvements? I think the most sensible way is to use LIDAR data where it's available (hopefully most of europe) and SRTM data for all other areas. |
We have all the time we need. There already is an elevation pool.
No, I didn't. But I used Iceland for my testing - is nice and isolated. But it has no old values.
Yes, that is the plan. |
I would love to see this, but how do we solve the problem that the current elevation filter logic won't work with both: brouter/brouter-core/src/main/java/btools/router/RoutingEngine.java Lines 840 to 845 in ef73d46
The SRTM data requires a threshold of 10 m while the LIDAR data apparently requires a threshold of 5 m to get resonable results in the total ascent calculation. I guess we would have to come up with a new filter method that works reasonably well with both data sets? |
@quaelnix
How did you get this value? |
By comparing the calculated total ascent of several routes with the expected total ascent (current BRouter, Komoot, Garmin). |
Here comes a workaround for a filter logic needed in |
When I was playing around with Sonny's LiDAR data back in June I found that the 3asec outperformed the 1asec data. Either I did something wrong when generating the *.bef files, or the 1asec data is simply more prone to artifacts. Would it be possible to provide a download link for the .rd5 files from Germany that contain the 1asec LiDAR data? |
@quaelnix |
I'm coming back to the subject "BEF generation" as part of my cleanup-project (branch "cleanupbranch") Meanwhile I adapted all binary-encoding related stuff to use the "statcoding" library. Unfortunatly, that used the reverse bit order compared to the current encoding code, and that affects also BEF generation. So I adapted the BEF format (purely technically, just reverse bit order and a magic-header word to detect wrong format) and at the same time I adapted the naming scheme (srtm_38_03.bef -> E5_N45.bef ) I also converted the tiny befs in the unit test that way. Then I converted the original SRTM3 set to that new format ( /home/mapcrator/srtm3_bef ) But I feel that is the right time to do the full job (=multi source merge from lidar, srtm1, srtm3 to create a global 1-arc-second data set). So I would like to understand the current status of research and data availability thanx for any pointers, Arndt |
@abrensch If you want me I could do the transfer to the reverse bit order - but it will take some time. |
There is "NASADEM Merged DEM Global 1 arc second", released in 2020:
|
Another interesting global dataset instead of SRTM/NASADEM might be: Copernicus DEM (GLO-30 Public)https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model
The license link is broken, but I found the document with a "_latest" added:
Example:
|
Regarding DTMs from LiDAR: apart from the Sonny compilation, I'm only aware of the older Terrain Tiles below. Might be worth doing some research and asking around. Terrain Tiles (Skadi)https://registry.opendata.aws/terrain-tiles/
Example: |
thanx. I will merge it manually to the cleanup branch. However, I like the idea to have only one single full 5x5 file in BEF format at map creation time. BEF format is made for fast decoding, and for 1 arc second data that matters. Different handling per raster type at mapcreation time should not ne neccesary, because the BEF files contain all meta infos needed. I remember that last time I tried that (some years ago) I had a hard struggle to create such files with an "extended border" of some pixellines, in order to allow bigger interpolation areas also at the tile-border. No I think, because it is so difficult, creating such a border should be a seperate processing step working only on 5x5 BEF files. The links on the availability of Copernicus data looks promising. I checked for it at one time or the other, but my status was you must apply for access as a research institute. |
That was my status as well, I just discovered that it's open now when browsing the elevation tag on the AWS open data registry. |
@afischerdev, would it be possible to rebase this branch on master and then perhaps create a https://brouter.de/afischerdev test instance, with .rd5 files containing the LIDAR (1asec) elevation data? |
@quaelnix |
I would be very interested in a test instance with Sonny's LiDAR 1asec data. Especially after @rkflx mentioned a few days ago that it was quite easy to find routes where this dataset fails, which does not match my previous observations. |
@quaelnix |
Germany. |
@quaelnix Added an image creator for bef and hgt files. Calls:
To compare the images I used WinMerge. |
For more test choices: added a color table to define output.
Result compare with WinMerge 3sec bef alt and viewfinder (I didn't find a N52E004 file in Sonny data). Call for this
|
Hello afischerdev! I started some tests and the first results are very promising: https://brouter.de/brouter-test/#map=14/49.9931/8.9207/osm-mapnik-german_style&lonlats=8.892191,50.004407;8.948779,49.97002 Note: be carrefull using the test-system: not all the tags are available (estimated_traffic_class a. e.) |
This case is strange for me as the elevation costs differ by more than 100%...and the routing on the test system is longer and higher... "forced routing" to the same route as "test": Test-system: |
If you decrease the downhillcutoff to 0.75 you get a similar elevation cost.
The |
@EssBee59, also keep in mind that placing waypoints will affect the content of the elevation filter around the waypoint. |
I just liked to understand, why the elevation costs here differ so much...
https://brouter.de/brouter-test/#map=13/50.9129/10.6639/osm-mapnik-german_style&lonlats=10.657338,50.902141;10.684802,50.931672 https://brouter.de/brouter-web/#map=13/50.9129/10.6640/osm-mapnik-german_style&lonlats=10.657338,50.902141;10.684802,50.931672 I could not find why the costs so differ |
According to the issues #558 and #539 I added some new classes with new naming convention
ElevationRaster
.This generates now also
bef
raster files in 1sec format fromhgt
formatted tiles in 1sec raster.The 1sec 5x5 raster generation has a fallback, when no 1sec source is found, a 3sec hgt file is called.
As a fallback the ESRI asc format is also supported. But please note this format has a 6000x6000 raster, the 3sec from hgt source have a size of 6001x6001 points.
Arguments for single file generation:
Samples
Arguments for multi file generation (world wide):
To work with the new raster size the rd5 generatator needs an extra paramater for the 3sec fallback
e.g.
$ ... PosUnifier nodes55 unodes55 bordernids.dat bordernodes.dat ../srtm/srtm1_bef ../srtm/srtm3_bef
As we have no hgt data on server I generated the Europa 1sec bef files locally from Sonny source and copied it to server into /srtm1_bef. There is already a folder /srtm3_bef that contains all the current elevation raster files.
The source already contains the routines for a 5x5 raster naming as it is used for the rd5 tiles. But as we have no world wide hgt data on server, we can't use it at the moment.