Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@
// "python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": true,
"editor.formatOnSave": true,
"python.analysis.indexing": true
"python.analysis.indexing": true,
"github.copilot.enable": {
"*": false,
"plaintext": false,
"markdown": false,
"scminput": false
}
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ python -m wahoomc gui
## To further adjust...
* [:cookie: Get POIs displayed on your Wahoo](docs/USAGE.md#pois---points-of-interest)

* [:bike: Integrate Wandrer into the generated maps](docs/WANDRER-INTEGRATION.md)

* [:mount_fuji: Integrate contour lines into the generated maps](docs/USAGE.md#pois---points-of-interest)

* [:wrench: Control OSM tags to be included in your maps ](docs/USAGE.md#user-specific-configuration)
Expand Down Expand Up @@ -72,4 +74,4 @@ More details can be found here: [CONTRIBUTING](docs/CONTRIBUTING.md#contributing

[@macdet](https://github.com/macdet) for bringing in new thoughts, testing and making this a little more public

[@vti](https://github.com/vti) for creating a GUI application to copy maps to wahoo and configure the device [POIs](https://github.com/vti/elemntary) as well as an [docker image](https://github.com/vti/wahooMapsCreator-docker) for wahooMapsCreator!
[@vti](https://github.com/vti) for creating a GUI application to copy maps to wahoo and configure the device [POIs](https://github.com/vti/elemntary) as well as an [docker image](https://github.com/vti/wahooMapsCreator-docker) for wahooMapsCreator!
9 changes: 3 additions & 6 deletions device_themes/vtm_theme_poi/vtm-elemnt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,7 @@
</m>
</m>


<m e="way" k="highway" v="track|byway" zoom-min="13" select="first">





<m k="tracktype" v="grade1">
<!-- Solid. Usually a paved or sealed surface-->
<m k="bicycle" v="bic_yes|bic_designated">
Expand Down Expand Up @@ -730,6 +724,9 @@
<line cat="bolt2" outline="bolt2-highway" stroke="#AA5500" width="4"/>
<line cat="bolt2-dark" outline="bolt2-major-roads-dark" stroke="#AA5500" width="4" />
</m>
<m e="way" k="wandrer" v="untraveled" zoom-min="14">
<line stroke="#FF0000" outline="major-roads" width="1.5" dasharray="10,12"/>
</m>
</m>
<!-- endregion -->

Expand Down
12 changes: 12 additions & 0 deletions docs/QUICKSTART_ANACONDA.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [Create Anaconda environment](#create-anaconda-environment)
- [Install wahooMapsCreator into Anaconda environment](#install-wahoomapscreator-into-anaconda-environment)
- [Update wahooMapsCreator](#update-wahoomapscreator)
- [Additional programs for integrating Wandrer data](#additional-programs-to-integrate-wandrer-files)
- [Additional programs for generating contour lines](#additional-programs-for-generating-contour-lines)
- [Install phyghtmap](#install-phyghtmap)
- [Verify phyghtmap](#verify-phyghtmap)
Expand Down Expand Up @@ -103,6 +104,17 @@ If you want to upgrade to a version other than the release actual one, use this
pip install wahoomc==2.0.0a5 --upgrade
```

## Additional programs to integrate Wandrer files
To integrate your progress in Wandrer to the generated maps you will need to install GPSBabel

Windows
Download and install from https://www.gpsbabel.org/download.html
Don't forget to add the path to gpsbabel.exe to the path environment variable!

macOS / Linux
Download and install from the same link as the Windows version or use the homebrew install here
https://formulae.brew.sh/formula/gpsbabel

## Additional programs for generating contour lines
For integrating contour lines into the generated maps, some additional steps need to be taken.
An additional Python packages has to be installed and you need an free account for USGS to query contour lines from.
Expand Down
8 changes: 8 additions & 0 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Main arguments](#main-arguments)
- [Examples](#examples)
- [POIs - Points of Interest](#pois---points-of-interest)
- [Wandrer integration](#wandrer-integration)
- [Contour lines](#contour-lines)
- [User specific configuration](#user-specific-configuration)

Expand Down Expand Up @@ -80,6 +81,7 @@ If you like to run wahooMapsCreator with another value than the default, use the
| -z | Zip the country (and country-maps) folder. | false |
| -v | Output debug logger messages. | false |
| -hdd | Use mapwriters hdd mode, 'type=hd' parameter. Slower processing, but good for low memory systems. | false |
| -dw | Integrate your Wandrer files to the maps generated. | false |

### Main arguments
**Create maps for a country**
Expand Down Expand Up @@ -115,6 +117,12 @@ Actually, wahooMapsCreator includes fuel stations, backeries, cafes and railway
- [see here](COPY_TO_WAHOO.md#activate-vtm-rendering)
- see also: https://github.com/treee111/wahooMapsCreator/wiki/Enable-hidden-features

## Wandrer integration
For creating maps that contain your traveled roads progress as recorded on the Wandrer site (https://wandrer.earth) do the following:
1. Enhance your Anaconda environment using [these steps](./QUICKSTART_ANACONDA.md#additional-programs-to-integrate-wandrer-files)
2. Create custom maps with the argument `-dw` like [normally](#run-wahoomapscreator-for-your-country). You will have to provide your Wandrer files in the Maps directory of your install.
3. Use a theme that renders untraveled roads.

## Contour lines
For creating maps which include contour lines and have them displayed on your Wahoo device, these steps need to be done:
1. Enhance your Anaconda environment using [these steps](./QUICKSTART_ANACONDA.md#additions-for--generating-contour-lines)
Expand Down
89 changes: 89 additions & 0 deletions docs/WANDRER-INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Adding Wandrer data to the maps
## What is Wandrer?
Wandrer is a (paid)subscription service that keeps track of which roads you have cycled and/or walked and which you have not traveled (yet).
It does this by importing tracks from your (free) Strava account. A subscription to Strava is not needed.
The free, test, version of Wandrer is limited to 50 imported Strava tracks.
More info is available in the Wandrer faq here: https://wandrer.earth/faq

The basic idea of Strava is to motivate you by letting you 'compete' against others, but let's be honest, there comes a time when you just know you are not going to be number 1 on speed or number of attempts anymore and the motivational push of Strava fades...
Or it just doesn't do it for you anymore.

Enter Wandrer. Instead of competing against others you can try to ride every road in a city, state/region or country etc! The motivation is to get as much roads ridden as you can.
Instead of always riding the same old roads as always, explore new areas that turn out to be around the corner.
Better yet, you can still compete against others through the leaderbord system based on distance and percentage of an area covered.

## What does it look like?
Here you have a Cruiser screenshot of a map without Wandrer integration
<div align="center">
<p>
<img src="./pictures/Cruiser-without-Wandrer-Screenshot.png" alt="Screenshot of map without Wandrer integration" width=80%>
</p>
</div>

With Wandrer integration the same map can look like this (depending on the theme used) Untraveled roads are show as red stippled. As you can see most of the roads on the upper side of this image are 'untraveled'.
<div align="center">
<p>
<img src="./pictures/Cruiser-with-Wandrer-Screenshot.png" alt="Screenshot of map with Wandrer integration" width=80%>
</p>
</div>

An actual on device screenshot can look like this. Again untraveled roads in a red stipple.
<div align="center">
<p>
<img src="./pictures/Wahoo-Ace-Wandrer-Screenshot.png " alt="Ace screenshot of map with Wandrer integration" width=50%>
</p>
</div>

## OK, great! I created a Wandrer account and everything from Strava is synced. How do I create these maps?
Of course you need to do the normal WahooMapsCreator installation first:
[:rocket: Quick Start Guide to download and install required programs](docs/QUICKSTART_ANACONDA.md#download-and-install-required-programs)

And to get you a bit familiar with the program read the following link and generate a small country like Malta for example to make sure all is set up correctly and working:
[:computer: Run wahooMapsCreator - detailled usage description](docs/USAGE.md#usage-of-wahoomapscreator)

Next, go to the Wandrer website and open up the 'Big Map' view. Zoom in/out until the display shows the region you want to have integrated in your maps AND the download icon in the right side bar (see pointer in next image) isn't greyed out any more.
If it is greyed out, zoom in until it turns solid. If needed you can integrate multiple Wandrer maps to your map to cover a larger area or add other area's.
Now press the download icon the pointer in the next image is pointing at and take over the settings show.
<div align="center">
<p>
<img src="./pictures/Wandrer-download-screen.png " alt="Screenshot showing how to download the Wandrer data" width=80%>
</p>
</div>
After pressing 'Continue' the Wandrer site will start creating your download file. When it is ready you will get an email with a download link and some additional information.

## Phew, pulled it of, whats next?
Copy the downloaded Wandrer KMZ file(s) to the _downloads\maps folder of your WahooMapsCreator installation without changing the filenames(!) and create the map for your desired region or x/y tile as normal.
Make sure to enable the "Integrate Wandrer files" on the Advanced settings tab when using the gui or add the -dw command line option when using the cli.

Thats it.

Now upload the generated maps to your device as usual.
If you are not using it already, try out VTI's Elemntary app for the uploads. It makes doing these kind of things so very much easier than by using abd https://github.com/vti/elemntary
One note on it though, do not use the settings in the Hidden features section. MAP_PAN_ZOOM just does not work anymore after a Wahoo firmware update and only use VTM_RENDERING on a v1 device. i.e. Elemntary, Bolt 1 or Roam 1.
If you do use it on a unit that already uses VTM rendering (all >v1 units) it will revert to acting like a v1 unit!!!

For people with existing installs of WahooMapsCreator, make sure to use the updated versions of tags-to-keep.json, tag-wahoo-poi.xml and the theme vtm_theme_poi\vtm-elemnt.xml.

If you want to keep your own version of any of these files you need to update them with the, few, changes made in these files which are easily found by searching them for "wandrer"

## Good to know:
The Wandrer kmz files you put in the maps folder are converted to osm.pbf files and the kmz file is renamed to processed-(wandrer file name).
The map, when on your device, is of cource not dynamically updated. i.e. untraveled red stippled roads will <b>NOT</b> magically turn 'unstippled' on the device after you ride them.
To update the untravelled status of roads you will need to re-download the region from Wandrer and re-generate the map.
When copying the new kmz file to the maps directory don't forget to remove the now obsolete old wandrer.osm.pbf file(s)!

Multiple Wandrer files are supported but all must be added and processed in one run or be completely part of another tile. Why? two reasons, you can very easily get into the situation where
two files have a, part of, the same region. An older file can have some roads marked as untraveled and a newer file can than have the same roads marked as traveled.
The result is a conflict and most likely the roads will still be shown as untraveled.

The other reason is more technical and more important. The osm.pbf files generated from the KML files by GPSBabel during the conversion to osm.pbf have negative way id's.
All converted files start with an id of -1 and so on which when using multiple files is a big no no.
Multiple identical id's are not allowed.

Also some of the tools used can't handle negative id's. So during the conversion process these negative id's are converted to big positive numbers.
When converting multiple files in one run this numbering is continued among the multiple input files (if there are that is).
But each new run of WMC starts with the same large positive number again. So if you have Wandrer-file-a converted in one run and Wandrer-file-b in a next run they will again
use the same id's and it won't work (unless they cover area's from an other tile all together)

Managing the Wandrer files in the maps folder is up to you.

Binary file added docs/pictures/Cruiser-with-Wandrer-Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pictures/Wahoo-Ace-Wandrer-Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pictures/Wandrer-download-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions wahoomc/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def process_call_of_the_tool():
help="output debug logger messages")
options_args.add_argument('-hdd', '--hdd_mode', action='store_true',
help="use mapwriter hdd mode")
options_args.add_argument('-dw', '--do_wandrer', action='store_true',
help="integrate wandrer data into map files")

args = parser_top.parse_args()

Expand Down Expand Up @@ -120,6 +122,7 @@ def process_call_of_the_tool():

o_input_data.verbose = args.verbose
o_input_data.hdd_mode = args.hdd_mode
o_input_data.integrate_wandrer = args.do_wandrer

return o_input_data

Expand Down Expand Up @@ -198,6 +201,7 @@ def __init__(self):
self.zip_folder = False
self.save_cruiser = False
self.hdd_mode = False
self.integrate_wandrer = False

self.verbose = False

Expand Down Expand Up @@ -316,6 +320,7 @@ def handle_create_map(self, event): # pylint: disable=unused-argument
self.o_input_data.zip_folder = tab2.first.checkb_zip_folder_val.get()
self.o_input_data.verbose = tab2.first.checkb_verbose_val.get()
self.o_input_data.hdd_mode = tab2.first.checkb_mapwriter_ram_hdd_val.get()
self.o_input_data.integrate_wandrer = tab2.first.checkb_integrate_wandrer_val.get()

# get text without \n in the end
self.o_input_data.tag_wahoo_xml = tab2.second.input_tag_wahoo_xml.get()
Expand Down Expand Up @@ -477,3 +482,5 @@ def __init__(self, parent, oInputData):
"output debug logger messages", 4)
self.checkb_mapwriter_ram_hdd_val = create_checkbox(self, oInputData.verbose,
"Use mapwriter HDD mode", 5)
self.checkb_integrate_wandrer_val = create_checkbox(self, oInputData.verbose,
"Integrate Wandrer files", 6)
7 changes: 5 additions & 2 deletions wahoomc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def run(run_level):

o_osm_maps = OsmMaps(o_osm_data)

if o_input_data.integrate_wandrer:
o_osm_maps.prepare_wandrer_data()

# Filter tags from country osm.pbf files'
o_osm_maps.filter_tags_from_country_osm_pbf_files()

Expand All @@ -88,11 +91,11 @@ def run(run_level):
o_osm_maps.generate_elevation(o_input_data.use_srtm1)

# Split filtered country files to tiles
o_osm_maps.split_filtered_country_files_to_tiles()
o_osm_maps.split_filtered_country_files_to_tiles(o_input_data.integrate_wandrer)

# Merge splitted tiles with land and sea
o_osm_maps.merge_splitted_tiles_with_land_and_sea(
o_input_data.process_border_countries, o_input_data.contour)
o_input_data.process_border_countries, o_input_data.contour,o_input_data.integrate_wandrer)

# Creating .map files
o_osm_maps.create_map_files(o_input_data.save_cruiser,
Expand Down
Loading