Skip to content
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

[Feature Request] Preload Quests by gpx route #473

Closed
Mannshoch opened this issue Aug 11, 2017 · 9 comments · May be fixed by #5369
Closed

[Feature Request] Preload Quests by gpx route #473

Mannshoch opened this issue Aug 11, 2017 · 9 comments · May be fixed by #5369

Comments

@Mannshoch
Copy link

Allow to load a gpx file to get the Quests along that route. So you do not need Internet on tour and you could plan the Quests you wish to answer.

@westnordost
Copy link
Member

No, because the download process inherently works with bounding boxes, not "along" certain tracks.

You can download an area by bounding box from the menu: Focus the map on that area, press "scan for quests here".

@CalliOSM
Copy link

from the recent weekyOSM Newsletter:
mmd wrote about a nice prototype demonstrating the power of the around: filter in Overpass API to show how you can download OSM data along a GPX track.
https://www.openstreetmap.org/user/mmd/diary/42055

@westnordost
Copy link
Member

Sounds promising, but it's not released yet.

Also, my previous statement stands. Is not an OSM limitation but a limitation of this app.

@l-mb
Copy link

l-mb commented Oct 24, 2023

Is there any chance to revisit this option? I know it implies potentially downloading quite a bit of data ahead of the hike, but having to take my device out of airplane mode (conserving battery) and manually pre-loading the next couple of areas that I'm likely passing through is a bit of a hassle.

It'd help if Street Complete at least had the ability to load and show a track (similar to how it shows the path I took?), then I could - if it can't be easily automated - do all the preloading manually.

(For most hikes, at that point Street Complete could even be my primary map app, having planned the hike with a different tool.)

@westnordost
Copy link
Member

westnordost commented Oct 24, 2023

Hmm, loading a GPX track and downloading data along it sounds like a feature that would be used only by few power users, as it requires first to draw up a GPX track in some other program, then loading it in StreetComplete.

So, I think this would be something that would rather be accepted as a PR in SCEE, an extended edition of StreetComplete geared towards power-users.

It is written in Kotlin, too. I think after parsing a GPX, it could be solved like this:

Downloads in StreetComplete must be done in bounding boxes that line up with a slippy map tile rect of zoom 16. So, we need to find which tiles to download.

var tiles
var last_tile

for each point in gpx_track:
  var tile = tile in which point is located
  add tile to tiles
  // * see below
  laste_tile = tile

// (I think there is an algorithm for that already somewhere in the source code)
reduce tiles to the smallest number of possible tile rects

download all these tile rects

What to do about if two GPX points are several tiles away from each other? Could either ignore that (so a GPX track with two points - Berlin Airport to Madrid Airport does not download a straight path through all of Europe). Otherwise,

val vector = tile - last_tile
val steps = length of vector
for each step in steps:
  val in_between_tile = tile + vector * step
  add in_between_tile to tiles

@Helium314
Copy link
Collaborator

Such functionality is more or less available in SCEE.

But loading along the track is rather limited, simply using the track bbox.
Since I don't want to ignore the default download size limit (danger of OOM crashes), download often needs to be done manually anyway. A PR for improvement would definitely be welcome though.

@Mannshoch
Copy link
Author

I don't think loading along the track need much data. Along a Track by car I only need the data 15m left and right the trackpoint. Along the track by foot may a bit more.
If I plan a longer trip e.g. through Europe. Than I do not need loading the whole track emediately.
A download also could happen in several steps with some timegap I'm between.

@mnalis
Copy link
Member

mnalis commented Oct 28, 2023

Such functionality is more or less available in SCEE.
But loading along the track is rather limited, simply using the track bbox.

Yes, in SCEE fork of StreetComplete, it is available under Settings / Display / Display GPX track from file, so @l-mb might want to try that (SCEE otherwise mostly looks just like StreetComplete unless one enables extra features, and it installs alongside regular StreetComplete and does not affect it, so should be easy to try out).

Since I don't want to ignore the default download size limit (danger of OOM crashes), download often needs to be done manually anyway. A PR for improvement would definitely be welcome though.

Yeah, last time I tried it (hoping to preload inter-city bus route so I can map during the ride) it bailed out with Download area too big, please download manually. But it displays selected GPX tracks just fine, and allows for manual downloads along the track (which is still tedious - thus I've suggested Helium314#471).

@mnalis
Copy link
Member

mnalis commented Nov 2, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants