GoMap icon indicating copy to clipboard operation
GoMap copied to clipboard

Need a way to download just OSM objects for Offline use

Open kevinp2 opened this issue 1 year ago • 7 comments

Uploading GoMap Offline Download-540p30.mov…

I am mapping the remote Dalton Highway in Alaska, which does not have cell connectivity for much of its length.

Unfortunately, the prepare for off-line feature does not seem to reliably download all the OSM objects in the view. I will attempt to attach a video showing how this works out.

Ideally, I would like a separate button to just download OSM objects only, which are the most useful for on the ground mapping when standing next to an object.

kevinp2 avatar Jul 24 '24 21:07 kevinp2

https://github.com/user-attachments/assets/a79219c5-4666-4bce-9453-7b92da737750

kevinp2 avatar Jul 24 '24 21:07 kevinp2

The “Prepare for Offline” feature only downloads aerial imagery, not OSM data/objects. To download those you can scroll along the highway to force the objects to be downloaded.

Once you’ve scrolled away from Fairbanks a ways you should be able to zoom out fairly far, which makes this less tedious to do this.

bryceco avatar Jul 24 '24 21:07 bryceco

I tried this, but it turns out to be quite tedious, unfortunately:

  1. Since I don’t care so much about the aerial tiles, I switch to Editor Only.
  2. I zoom out, but I can only zoom out until the scale on the lower left shows about 1 mile. If I zoom out any further, the map changes mode and I can’t see the objects any more, and they won’t download any more.
  3. I can then scroll along the highway. But I have to stop every time to make sure that the green activity indicator completes, and then scroll again. Picture below.

After about ten minutes of patiently doing this by hand, I had maybe a quarter of the highway done.

It would be a fantastic enhancement to simply download for offline ALL the OSM objects in the current view. To me, that is what Prepare for Offline really means :-)

IMG_5144

kevinp2 avatar Jul 25 '24 00:07 kevinp2

That would be around 100,000 square miles of data, and the way the app is architected all downloaded objects are resident in memory. It would require some testing to see what the memory footprint would be for that, not to mention the OSM server only allows downloads of 0.25 square-degrees at a time.

bryceco avatar Jul 25 '24 03:07 bryceco

There could be some limits enforced, particularly if you allow the user to select a rectangle. Apple Maps allows offline downloads using a user-selected rectangle up to a certain size.

kevinp2 avatar Jul 25 '24 08:07 kevinp2

fa2b1e1eb2c13a75ae48982a1437194c0f864c91 increases the viewable area before disabling editing.

bryceco avatar Jul 27 '24 05:07 bryceco

I prototyped this (lots of hacks, nowhere close to ready for production use) and while it took a long time to perform the download the total amount of data wasn't too bad: around 600,000 objects (nodes + ways + relations) with a total memory footprint of around 450 MB. So worth doing some further investigation.

bryceco avatar Jul 28 '24 01:07 bryceco