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 tile on demand fetching #3391
Conversation
cbf3f96
to
4a99139
Compare
Excellent I've been wanting to do this forever! I'll take a look in the next few days |
can you elaborate a little on what "on demand" means? didn't look too much into the changes, but it seems like it's mostly a new executable, from what I can see duplicating what we just added to |
ah think I got it.. was just adjusting a planet build to only cover the graph with elevation and in the current situation I have to do the build in stages, stopping after the graph initially built, then run the py script to download the elevation, then start again at enhance. with this PR I guess you don't have to do multi-stage builds right? argh, then I wish I would've waited 2 more weeks before implementing exactly that in the py script, would've saved me a few hours 😅 much simpler now, thanks for that! |
The general idea is not to fetch unnecessary elevation tiles(e.g around the oceans) and this is what both
Speaking of new for tile in valhalla_tiles:
if tile not processed:
./valhalla_add_elevation --graph-tile tile
cache tile We can probably move |
right, thanks for the explanation @merkispavel ! maybe for planet py might be slightly cheaper. eventually I hope I don't have to download the full planet for a while though;) IMHO |
@nilsnolde yeah this is what i was trying to suggest in that recent pr from @molind , its great to see someone just knock this out |
@merkispavel im not sure about that, i still think this implementation can win because we coalesce requests for the same tile to the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'm not sure we need concurrent fetching on the
sample::get_all
level - I would think about merging
sample::get_from_remote
method withcache_t
class so that we could just callcache->tile(index)
and all fetching/saving/caching things are hidden in the cache class.
Maybe we can wrap existingcache_t
class and enhance it with fetching logic
In my opinion this is so incredibly similar to the graph tile fetching we should move that implementation into the curler header and just use it in both places (graph tile and sample). Otherwise we are duplicating the logic but with slight differences. The only real difference they need is to fetch different urls |
5047c6d
to
50d03d9
Compare
Added: addtional tests to elevation_builder
9275861
to
ab2b4cb
Compare
ab2b4cb
to
7b65893
Compare
Co-authored-by: Pavel Merkis <pavel.merkis@mapbox.com>
Co-authored-by: Pavel Merkis <pavel.merkis@mapbox.com>
Co-authored-by: Pavel Merkis <pavel.merkis@mapbox.com>
Co-authored-by: Pavel Merkis <pavel.merkis@mapbox.com>
a9abd10
to
bd701cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
bd701cb
to
f522270
Compare
I'm sorry that it took so long. And thank you for the work @Neyromancer. I tested it locally: works as expected @kevinkreiser Let us know if you'd like to take a look or it's ok to merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-approve
standalone on-demand elevation tile loader which allows to download elevation tiles from remote storage.