Work with prefetched OSM tiles from local SD

Bug #1568483 reported by Matthias Apitz
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
uNav
Won't Fix
Undecided
Unassigned

Bug Description

It is relatively easy to prefetch tiles from the OSM servers and have them
as a local tree, for example on the SD like

OSM/10/0
OSM/10/0/0.png
OSM/10/0/1.png
OSM/10/1
OSM/10/1/0.png
OSM/10/1/1.png
OSM/10/272
OSM/10/272/445.png
OSM/10/272/446.png
OSM/10/273
OSM/10/273/384.png
...
OSM/18/139404
OSM/18/139404/90871.png
OSM/18/139404/90872.png
OSM/18/139404/90873.png

Of course, they need there space and one can not have world on the device, but at least
the areas of interest. I have two big cities, Munich and Havanna where I live or travel
and they need upto lavel 18 only 1 GByte of space.

uNav should use such "offline" tiles if they are there in preference of fetching them
from the OSM servers.

A possible solution we are testing at the moment is a modified unav.desktop
file as:

    Desktop Entry]
    Name=unav-osm
    Type=Application
    Exec=/usr/bin/nohup /home/phablet/unav.sh
    Icon=/userdata/system-data/opt/click.ubuntu.com/navigator.costales/0.57/icon.png
    Terminal=false
    X-Ubuntu-Touch=true

and launching in front of uNav a small HTTP server with the script /home/phablet/unav.sh
as:

    #!/bin/sh

    # 1st start the local HTTP server:
    cd /media/phablet/*/Maps
    python3 -m http.server 8888 &

    # now start uNav
    cd /userdata/system-data/opt/click.ubuntu.com/navigator.costales/0.57/
    qmlscene %u qml/Main.qml

This works very nicely with a modified /userdata/system-data/opt/click.ubuntu.com/navigator.costales/0.57/index.html
to direct the request to http://127.0.0.1:8888/osm/

Other solutions may be possible.

Revision history for this message
costales (costales) wrote :

Thanks a lot Matthias for your help ;)
You are a great hacker :)

Vincent Ladeuil (vila)
Changed in unav:
status: New → Confirmed
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Maybe that would be great to investigate how OSMAnd does (https://github.com/osmandapp/Osmand), as it seems to use compressed xml files which are space savvy and is able to render maps locally.

It also deals with offline navigation, which would be a nice feature for uNav too.

Revision history for this message
costales (costales) wrote :

This will be possible when system allows that. Until now, upstream bug ;)

summary: - BQ E4.5 (OTA-10): uNav to work with prefetched OSM tiles from local SD
+ Work with prefetched OSM tiles from local SD
Changed in unav:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.