Open Roryplewes opened 2 months ago
Here is a possible updated code that uses the designation tag to work out if its a byway. Unfortunately it still doesnt work
`<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" map-background="#FFFFFF" version="1" xmlns="http://opensciencemap.org/rendertheme" xsi:schemaLocation="http://opensciencemap.org/rendertheme https://raw.githubusercontent.com/mapsforge/vtm/master/resources/rendertheme.xsd">
`
Could you post a example location? I'm having a hard time to find an actual byway using overpass turbo.
Having said that, you can't just use any key/tag you find on Openstreetmap because only a limited set is used in the creation of the wahoo maps. A lot, if not most, are filtered out to reduce the size of the resulting maps. You can change which keys/tags are kept by adjusting the tags-to-keep.json file.
So <m k="designation" v="byway_open_to_all_traffic">
is not going to work atm because neither the key nor the tag are actually in the map files.
The line above it should work though: <m e="way" k="highway" v="track|byway" zoom-min="13" select="first">
If you want to add the designation and byway_open_to_all_traffic key/tag you should add them to the tags-to-keep.json file AND add them to the tag-wahoo.xml file. The first file prevents them from being filtered out of the source maps, the second one tells the mapwriter to include them in the generated map (and how).
And yes, documentation is sparse to say the least. The only "official" docs as far as I know are https://github.com/mapsforge/vtm/blob/master/docs/Rendertheme.md and https://github.com/mapsforge/vtm/blob/master/resources/rendertheme.xsd
Edit: Could you please also post your complete theme file? I try to collect and share them for others to use and learn from at https://onedrive.live.com/?authkey=%21AM8e4ViJIHdmOyU&id=F4E28DC020FD3904%21756&cid=F4E28DC020FD3904 And without it's hard to test your issue.
Edit 2:: Added code tags around the two theme lines
Sure, here is the theme I cannot get byways to work on at the moment. A location that is good for testing I have found is here https://maps.app.goo.gl/kt5AShSzgzP5WUEr7
For some reason it wont let me add it to the one drive?
When you say you have added code tags around the theme lines does that mean I dont need to?
If you write a reply, you can add your theme between code tags, the <> symbol above your message. You seemed to have used it in your second post but that one is missing at least the top part of the theme. You should be able to paste your whole theme between those code tags in one go. I referred to the code tags in my edit because without them the two lines I quoted from your theme where not visible.
You "should" be able to write to the OneDrive too. When this happens to me it helps for me to select one of my own folders on the left side and then select the folder from my post again.
Your example road points to a way that is not a byway? Unless you mean an other road then this one: https://www.openstreetmap.org/way/1288964814#map=17/51.04335/-0.84184 I'll try to have a look this afternoon. (if you can post your complete theme)
But maybe I already spot the problem. I don't know where you got the basis for your theme from, but it seems to use colors that the Wahoo devices can not display like #F52D2D. If you look at the vtm sample theme folder for the bolt and roam 2 on the OneDrive, there is a colours.html file there that shows the allowed colors.
I mean this one https://www.openstreetmap.org/way/511
I dont think its a colour problem as the #F52D2D has been showing red on my wahoo for private tracks like it should do.
`<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" map-background="#FFFFFF" version="1" xmlns="http://opensciencemap.org/rendertheme" xsi:schemaLocation="http://opensciencemap.org/rendertheme https://raw.githubusercontent.com/mapsforge/vtm/master/resources/rendertheme.xsd">
For some reason your posts keep containing only part of the data. The theme file is missing a large part of the start it seems and possibly something on the end too. Let's try it differently. If you put the files in a zip file, you can attach it to a reply with the paperclip icon. Hopefully this way the files will be complete.
In the tags-to-keep.json you added the designation key to the highway key. As it's a key it should be in it's own block with the possible tags/values you want to keep like:
"designation": [ "byway_open_to_all_traffic", "public_bridleway ", "permissive_bridleway", "restricted_byway" ],
This should then be matched by lines in the tag-wahoo.xml (you can only specify one such file to be used during the map creation)
You now have a line <osm-tag key="highway" value="designation" zoom-appear="10" />
that combination does not exist
this should be something like <osm-tag key="designation" value="byway_open_to_all_traffic" zoom-appear="10" />
With a line for each key/value combination you want.
If you have created a map with these settings added maybe post the corresponding tile file of containing this road somewhere where I can download it. I can then check if the key/tags are actually in the map file. As long as they are not in the map file there is little use to look at the theme (for this road).
Full theme further below. That should show the full theme, not sure why it doesnt show the whole thing in the code block.
What I have done in the theme above is use the default maps that are downloaded rather than change the tags to include ect as I cant seem to get it to work. As byways are always marked as tracks I have just added the tag that if the track type is not set but there is bike access show a blue dashed line (Same as bridleways).
I believe the designation tags for tracks for bikes are all brought through (Yes, Permissive, Designated ect) so that it will actually work?
Okay, lets try to sort this out the proper way.
So attached is the theme I want to use. In short anything with blue is able to be ridden, anything else is private or not. Tracks are shown with a black solid line, byways a yellow solid line, bridleways blue solid line. Then the dashes should be blue if bikes are allowed and black if not. Bridleways and Byways should always show as blue as they always have bike access. vtm-elemnt Tracks Arranged (Test).zip _config.zip
Ideally I would like to do them same with footpaths except if it doesnt have bike access its black, if it does it shows blue. No changes to the dash array or line form.
You may also see in the tags I am trying to get some barriers to show.
Added the wrong VTM. Here is the one I want to use for Byways. [Uploading vtm-elemnt byways and tracks (TBC).xml.zipβ¦]()
When trying to download maps with the custome theme I get this error.
INFO:# Filter tags from country osm.pbf files
INFO:+ Filtering unwanted map objects out of map of united-kingdom
Traceback (most recent call last):
File "/opt/anaconda3/envs/gdal-user/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/anaconda3/envs/gdal-user/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/main.py", line 7, in
The last zip file you posted is actually a link to this issue instead of the theme file zip :-)
The error message is because your change to the tags-to-keep.json file. Loose the comma behind "kissing_gate", that should do the trick.
Changed the tags file, going to run that once I have generated a non modified map.
Having worked it IT I should have picked up that extra comma, silly copy and paste mistakes.
Here is the VTM theme I want to use with the designation. I may need to double check the footpath VTM allocation and I may need to add in the tags to keep so that it brings in Bic access for footpaths.
Might as well sort out the VTM theme so that I know what tags I am missing on the tags to keep and POI's file.
BTW thanks so much for the help. π₯³π
I can't load the tbc theme file because there is a xml tag mismatch somewhere. Probably a missing somewhere.
Note though, you seem be somewhat copying and pasting blocks around the theme file. Keep in mind there is a certain order in processing this file. You start out with the big areas like sea, land, water, parks etc and then you paint roads/paths etc over that. I.e. order matters. If you have multiple matching rules, the last one WILL paint OVER a previous matching rule. For example the road you posted as example is shown on cruiser like a blackish dashed line. But when I change the color used in these lines `
` To red (#FF0000) the road gets a red hue at the outside. Indicating it is painted as red first and painted over later with a darker color again. I see you are on mac. That probably means you can't use cruiser. I understand it works on 32b macOS but not on 64b versions.
Yeah, I am on a mac so cruiser does not work so I have to load the VTM onto my wahoo, turn it off then back on and then go and take a look at all of the different types. Yeah moving from 32 bit to 64 bit is a nightmare.
To be honest I have go a lot of it working but have just had a nightmare in the VTM file sorting out the ordering as I am just using text edit to change stuff rather than a specific tool. VSCode may be better as at least then I can see the the tag opening and closing.
I can describe how I want stuff to show if it helps. I am pretty happy with the road and cycle path colours, it just the offroad access I want to change.
Because the rules I want are. If its a footpath show black 9,3 dasharray (Same as in my file) If its a footpath with bike access show the same array and width but in blue.
Then for paths show them the same as footpaths, same with bike access, but paths can be bridleways or byways so if its one of those designations it should just show blue anyway as they have bike access by default.
Bridleways can always show blue dotted with solid in the middle
Tracks or paths with byways can be blue dotted with a yellow inside
Tracks show as blue if they have bike access, black if no access specified and red if private is applicable. Those are the main rules but I guess there are a lot that I have not even thought about.
As of your cruiser example it shouldnt have any red as it isnt private?
Okay, what I have done is go back to a previous version. What I need is some help to add in that if a footpath has bike access it shows .
If a path has bike access it shows
Then if its a track with bike access it uses
If its a track, path, footpath or with the designation of some form of byway or bridlepath then it shows this theme. This being the largest/ most permissive should be processed first so that it always shows if it has this designation.
I then need to download the correct barriers so that it uses the SVG files for those barriers ect.
Do you think you could help correct the VTM file so it has the correct allocation for bike access and then help modify the config files I would need to get that to work for the extra access and designation tags I need?
_config copy.zip vtm-elemnt byways.xml.zip
Thanks so much if you can help get this to work. I have spent hours trying to do this unknowing I had to add in the required tags to the map download and not just the theme
To help test here are some tracks and what format they should fall under:
Footpath - https://www.openstreetmap.org/way/512
<!-- Footpath -->
<style-line id="bolt2-footpath" cat="bolt2" stroke="#363636" width="0.5" dasharray="9,3" cap="butt" />
Footpath with bikes allowed - https://www.openstreetmap.org/way/1288964814
<!-- Footpath-bicycle -->
<style-line id="bolt2-footpath-bicycle" cat="bolt2" stroke="#0000FF" width="0.5" dasharray="9,3" cap="butt" />
path with byway designation - https://www.openstreetmap.org/way/62273095
<!-- Byways with Bicycle Access -->
<style-line id="bolt2-byway-track" cat="bolt2" stroke="#00008b" width="1.2" dasharray="4,3" cap="butt" />
<style-line id="bolt2-byway-track-solid" cat="bolt2" stroke=β#99ff33β width="0.6" cap="butt" />
Track with byway designation - https://www.openstreetmap.org/way/649
<!-- Byways with Bicycle Access -->
<style-line id="bolt2-byway-track" cat="bolt2" stroke="#00008b" width="1.2" dasharray="4,3" cap="butt" />
<style-line id="bolt2-byway-track-solid" cat="bolt2" stroke=β#99ff33β width="0.6" cap="butt" />
Bridleway - https://www.openstreetmap.org/way/1163848991
<line cat="bolt2" stroke="#00008b" width="1" dasharray="3,3" cap="round" />
<line cat="bolt2" stroke="#00008b" width="0.5" cap="round" />
Tracks with bike access - https://www.openstreetmap.org/way/1288966802
<!-- Tracks with Bicycle Access -->
<style-line id="bolt2-track-cycle" cat="bolt2" stroke="#00008b" width="1.2" dasharray="4,3" cap="butt" />
<style-line id="bolt2-trackcycle-solid" cat="bolt2" stroke="#000000" width="0.6" cap="butt" />
Tracks without bike access - https://www.openstreetmap.org/way/400363008
<!-- Tracks without bicycle access -->
<style-line id="bolt2-byway-track-no-access" cat="bolt2" stroke="#000000" width="1" dasharray="4,3" cap="butt" />
<style-line id="bolt2-byway-track-solid-no-access" cat="bolt2" stroke="#000000" width="0.5" cap="butt" />
If anything is marked as private and does not have any access tags it should show the feature as referenced but have all colours as red. If something is marked as private but does have access then it should show the feature as normal. For example a track marked as private with no bikes allowed or doesnt specify bikes are allowed should show red. Whereas if its marked private but has bikes set as permissive it should show the normal track with bikes allocation.
<!-- Tracks with Bicycle Access -->
<style-line id="bolt2-track-cycle" cat="bolt2" stroke="#00008b" width="1.2" dasharray="4,3" cap="butt" />
<style-line id="bolt2-trackcycle-solid" cat="bolt2" stroke="#000000" width="0.6" cap="butt" />
I think I have explained most of what I want to do, its just the doing that is tricky as I have not quite got the map information I need. Then in the VTM file I get muddled as I thought it was first match was what it used.
I'm not really the right guy for theming and am actually having a "challenge" with a theme issue myself at the moment. I'm not promising anything and it won't be for tonight but I am willing to help out where I can. Could you post references to roads like I did? Where the actual road is selected? If you look at your first two links above, the url's are identical and show me a area so I still don't know for sure what way you are referring to. Also, make sure to use allowed colors, at least atm, to avoid not seeing what you are doing. You say it works for you on your bolt 2 but it doesn't always. See this issue for example were the fault was just a single not displayed color: https://github.com/treee111/wahooMapsCreator/issues/221
The select="first" works, but only within the block. With all possible combination of tags and rules it becomes very tricky very fast :-)
Thanks very much. Changed the comment above so they should now link to the actual feature rather than the area. Take all the time you need, your help is most valuable. I am sure the is something I can do to repay you if we can get close to my desired result.
I have changed the colours so that they are the ones used within the colors file. Yes, its an easy file to get lost in quite quickly.
This file is the Byway one with the designation that doesn't render properly at all, just shows all weird so its not usable at all. Changed the colors as per requested. vtm-elemnt byways and tracks (TBC).xml.zip
This file is one I a currently using, doesn't seem to want to render the POI's but works for most of the other tracks but is quite limited and doesn't really show it how I want. I have used the updated config code to ensure the pois are included and designations are in the code. vtm-elemnt.xml.zip
Out of interest what about the POI's? Should the colours in the SVG also match the wahoo color scheme. So far I have only got the default ones to work.
I have to guess at what you have done/tried so far but using barrier bollard as an example you seem to have the right settings in the files. It is in the tags-to-keep file, it is in the tag-wahoo-poi file and it is in the theme.
What can still go wrong? Obviously, you have to recreate the map with these settings (maybe you need to delete any temp files. I do not use this version of the mapcreator so I don't know from the top of my mind if filtered source maps are kept in a temp folder for example) Also make sure to indicate to use the tag-wahoo-poi file.
Lastly make sure the icon files are on your device and yes, colors do matter!
If you need to change the colors you can do so by opening the .svg file in a text editor, they are just plain text files and change the colors. Or just to test, copy and rename an icon file that does work atm.
The last vtm-elemnt.xml you posted above does show some poi's for me, so it does work but of cource I don't have the barriers in my map file
I am using the GUI to create the maps. I assume it is looking at the tag-wahoo-poi, but I have not specifically said to. Although it did error when I added in the invalid json whereas previously when the config was blank it would not error. The default icons show absolutely fine. I ran a test by changing the gate icon to the train one (I know the train works) and it does not show it. Therefore as I am pretty sure I put on the most recent downloaded map I think the map did not add in the correct POI's. Tomorrow I will run it again and see if I can get the POI's to work.
Hi all,
I have created a custom VTM theme for my wahoo. Still getting used to how all the tagging works as I cant find a good place to find the documentation. I am from the UK where byways always have access to horses cars and bikes, sometimes not cars though whereas tracks can be private or give bike access.
Due to the original theme showing both byways and tracks in the same themes I decided to split them so that tracks show as black with black dashed arrays unless there is bike access in which case they show as blue dashed arrays with a black solid line. However I want byways to show as blue dashed arrays with a yellow solid line. As byways are pretty much always open access I want them to always show as blue dashed arrays with a yellow solid line. The problem is at the moment my custom VTM profile is not working and just shows the tracks and black with black.
I think its caused by the fact Byways are tracks with a designation of byway_open_to_all_traffic rather than what I have stated as byway being its own feature type.
Any help on all of this would be really appreciated.
`<?xml version="1.0" encoding="UTF-8"?> <rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" map-background="#FFFFFF" version="1" xmlns="http://opensciencemap.org/rendertheme" xsi:schemaLocation="http://opensciencemap.org/rendertheme https://raw.githubusercontent.com/mapsforge/vtm/master/resources/rendertheme.xsd">
`