treee111 / wahooMapsCreator

Create maps for Wahoo device based on latest OSM maps
247 stars 25 forks source link

Byways vs Tracks #248

Open Roryplewes opened 2 months ago

Roryplewes commented 2 months ago

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">

<!-- Footpath -->
<style-line id="bolt2-footpath" cat="bolt2" stroke="#363636" width="0.5" dasharray="9,3" cap="butt" />
<!-- Footpath-bicycle -->
<style-line id="bolt2-footpath-bicycle" cat="bolt2" stroke="#0000FF" width="0.5" dasharray="9,3" cap="butt" />
<!-- Steps -->
<style-line id="bolt2-steps" cat="bolt2" stroke="#000000" width="0.5" dasharray="9,9" cap="butt" />
<!-- Cycle Trails (like MTB) -->
<style-line id="bolt2-trail" cat="bolt2" stroke="#00008b" width="1.3"/>
<!-- Paved Tracks -->
<style-line id="bolt2-track-paved" cat="bolt2" stroke="#000000" width="1.3" />
<style-line id="bolt2-track-paved-cycle" use="bolt2-track-paved" />
<!-- Non-paved tracks -->
<style-line id="bolt2-track-raw" cat="bolt2" stroke="#363636" width="1.1" dasharray="3,3" />
<style-line id="bolt2-track-raw-cycle" cat="bolt2" stroke="#555555" dasharray="6,3"/>
<!-- Tracks that don't have other info -->
<style-line id="bolt2-track-other" cat="bolt2" stroke="#363636" width="1.1" dasharray="5,5" />
<style-line id="bolt2-track-other-cycle" use="bolt2-track-other" stroke="#00008b" />
<!-- Paved Cycleways-->
<style-line id="bolt2-cycle" cat="bolt2" stroke="#00008b" width="1.3" />
<!-- Byways and Tracks with Bicycle Access -->
<style-line id="bolt2-byway-track" cat="bolt2" stroke="#00008b" width="1" dasharray="4,3" cap="butt" />
<style-line id="bolt2-byway-track-solid" cat="bolt2" stroke="#FFFF00" width="0.5" cap="butt" />
<!-- 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" />
<!-- region land/sea/waterways -->
<m e="way" k="natural" v="sea">
    <area cat="bolt2" fill="#00FFFF" />
</m>
<m e="way" k="natural" v="nosea">
    <area cat="bolt2" fill="#ffffff" mesh="true" />
</m>
<m e="way" k="natural|landcover|landuse" v="wood|trees|scrub|forest">
    <area cat="bolt2" fill="#55FF55" fade="8" blend="12" blend-fill="#AAFFAA" />
</m>
<m e="way" k="landuse" v="building">
    <area cat="bolt2" fill="#AAAAAA" fade="8" blend="13" blend-fill="#FFAAFF" />
</m>
<m e="way" k="leisure" v="park|nature_reserve">
    <area cat="bolt2" fill="#AAFF55" />
</m>
<m e="way" k="natural" v="wetland">
    <area cat="bolt2" fill="#55FFFF" />
</m>
<m e="way" k="natural" v="beach" zoom-min="12">
    <area cat="bolt2" fill="#FFFF00" />
</m>
<m e="way" k="natural" v="water">
    <area cat="bolt2" fill="#00AAFF"/>
</m>
<m e="way" k="waterway" v="river|canal">
    <line cat="bolt2" width="1" stroke="#00AAFF" />
    <pathText display="always" cat="bolt2" fill="#0000AA" k="name" font-family="sans_serif" font-style="bold" priority="2" size="16" stroke="#ffffff" stroke-width="3.0" zoom-min="14" />
</m>
<m e="way" k="waterway" v="stream" zoom-min="14">
    <line cat="bolt2" width="1" stroke="#00AAFF" />
</m>
<m e="way" k="waterway" v="river|riverbank|canal" closed="yes">
    <area cat="bolt2" fill="#00AAFF"/>
</m>
<!-- endregion land/sea/waterways -->
<!-- region tunnels -->
<m e="way" k="tunnel" v="true|yes" zoom-min="8">
    <m e="way" k="highway" v="residential|living_street|road|unclassified" zoom-min="13">
        <line cat="bolt2" stroke="#363636" width="1.3" dasharray="10,7" cap="round" />
    </m>
    <m e="way" k="highway" v="residential|living_street|road|unclassified" zoom-min="10" zoom-max="12">
        <line cat="bolt2" stroke="#AAAAAA" width="1.5" dasharray="10,7" cap="round" />
    </m>
    <m e="way" k="highway" v="tertiary|tertiary_link|secondary_link|secondary" zoom-min="9">
        <line cat="bolt2" stroke="#FFFF00" width="2.0" dasharray="10,7" cap="round" />
    </m>
    <m e="way" k="highway" v="primary_link|trunk_link|motorway_link|primary|trunk" zoom-min="9">
        <line cat="bolt2" stroke="#FFAA00" width="2.0" dasharray="10,7" cap="round" />
    </m>
    <m e="way" k="highway" v="motorway" zoom-min="12">
        <line cat="bolt2" stroke="#AA5500" width="3.5" dasharray="10,7" cap="round" />
    </m>
    <m e="way" k="highway" v="motorway" zoom-min="8" zoom-max="11">
        <line cat="bolt2" stroke="#AA5500" width="4.0" dasharray="10,7" cap="round" />
    </m>
    <!-- tunnel trails -->
    <m cat="trails-osm" k="access" v="-|private">
        <m e="way" k="highway" v="footway|pedestrian" zoom-min="13">
            <line use="bolt2-footpath" dasharray="9,3"/>
        </m>
        <m e="way" k="highway" v="steps" zoom-min="13">
            <line use="bolt2-steps" dasharray="10,7"/>
        </m>
        <m cat="trails-osm" e="way" k="highway" v="cycleway" zoom-min="12" select="first">
            <!-- cycleways can be paved or raw -->
            <m k="surface" v="bic_unpaved">
                <line use="bolt2-track-raw-cycle" dasharray="10,7"/>
            </m>
            <m k="highway" v="cycleway">
                <line use="bolt2-cycle" outline="bolt2-bikepath" dasharray="10,7"/>
            </m>
        </m>
        <m e="way" k="highway" v="path" zoom-min="12" select="first">
            <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                <!-- specifically for cycle -->
                <m k="surface" v="bic_paved">
                    <line use="bolt2-trail" dasharray="10,7" outline="bolt2-bikepath"/>
                </m>
            </m>
            <m k="surface" v="bic_paved">
                <line use="bolt2-track-paved" dasharray="10,7"/>
            </m>
            <m k="foot" v="bic_yes|bic_designated|bic_permissive" zoom-min="13">
                <!-- specifically for foot but with bikes -->
                <line use="bolt2-footpath-bicycle" dasharray="9,3"/>
            </m>
            <m k="foot" v="ft_yes|foot_designated" zoom-min="13">
                <!-- specifically for foot -->
                <line use="bolt2-footpath" dasharray="9,3"/>
            </m>
            <m k="highway" v="path" zoom-min="13">
                <!-- remainder -->
                <line use="bolt2-footpath" dasharray="9,3"/>
            </m>
        </m>
        <!-- Byways section -->
        <m e="way" k="highway" v="byway" zoom-min="13" select="first">
            <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                <line use="bolt2-byway-track"/>
                <line use="bolt2-byway-track-solid"/>
            </m>
            <m k="bicycle" v="~">
                <line use="bolt2-byway-track"/>
                <line use="bolt2-byway-track-solid"/>
            </m>
            <!-- Default style for byways to ensure blue dashes -->
            <line use="bolt2-byway-track"/>
            <line use="bolt2-byway-track-solid"/>
        </m>
        <!-- Tracks section -->
        <m e="way" k="highway" v="track" 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|bic_permissive">
                    <line use="bolt2-byway-track"/>
                    <line use="bolt2-byway-track-solid-no-access"/>
                </m>
                <m k="bicycle" v="~">
                    <line use="bolt2-byway-track-no-access"/>
                    <line use="bolt2-byway-track-solid-no-access"/>
                </m>
            </m>
            <m zoom-min="13">
                <m k="tracktype" v="grade2">
                    <!-- Solid but unpaved. Usually an unpaved track with surface of gravel -->
                    <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                        <line use="bolt2-byway-track"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="bicycle" v="~">
                        <line use="bolt2-byway-track-no-access"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                </m>
                <m k="tracktype" v="grade3">
                    <!-- Mostly solid. Even mixture of hard and soft materials -->
                    <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                        <line use="bolt2-byway-track"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="bicycle" v="~">
                        <line use="bolt2-byway-track-no-access"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                </m>
                <m k="tracktype" v="grade4">
                    <!-- Mostly soft. Almost always an unpaved track prominently with soil/sand/grass,
              but with some hard or compacted materials mixed in -->
                    <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                        <line use="bolt2-byway-track"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="bicycle" v="~">
                        <line use="bolt2-byway-track-no-access"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                </m>
                <m k="tracktype" v="grade5">
                    <!-- Soft. Almost always an unimproved track lacking hard materials,
              same as surrounding soil -->
                    <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                        <line use="bolt2-byway-track"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="bicycle" v="~">
                        <line use="bolt2-byway-track-no-access"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                </m>
                <m k="highway" v="path">
                    <!--  other paths that haven't already matched -->
                    <line use="bolt2-footpath" />
                </m>
                <m e="way" k="tracktype" v="~" select="first">
                    <!--  other tracks that haven't already matched -->
                    <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                        <line use="bolt2-byway-track"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="bicycle" v="~">
                        <line use="bolt2-byway-track-no-access"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="foot" v="ft_yes|foot_designated">
                        <!-- specifically for foot -->
                        <line use="bolt2-footpath" dasharray="4,3" />
                    </m>
                </m>
            </m>
            <!-- Default style for tracks to ensure black dashes -->
            <line use="bolt2-byway-track-no-access"/>
        </m>
    </m>
    <!-- end tunnel trails -->
</m>
<!-- region highways -->
<m e="way" k="tunnel" v="~|no|false" zoom-min="8">
    <!-- highway outlines -->
    <outline-layer cat="bolt2" id="bolt2-highway" stroke="#550000" width="1" />
    <outline-layer cat="bolt2" id="bolt2-major-roads" stroke="#000000" width="0.6" />
    <outline-layer cat="bolt2" id="bolt2-minor-roads" stroke="#000000" width="0.4" zoom-min="12" />
    <outline-layer cat="bolt2" id="bolt2-bikepath" stroke="#000000" width="0.3" zoom-min="12"/>
    <!-- the outline of bridges -->
    <outline-layer id="bridge" stroke="#000000" width="1" />
    <outline-layer id="bridge_small" stroke="#666666" width="0.6" />
    <m e="way" k="area" v="~|no|false">
        <!-- region paths & tracks -->
        <m k="access" v="private" zoom-min="13">
            <m e="way" k="highway" v="path" zoom-min="12">
                <line stroke="#F52D2D" width="0.4" dasharray="10,7" cap="butt" />
            </m>
            <m e="way" k="highway" v="footway|pedestrian" zoom-min="12">
                <line stroke="#F52D2D" width="0.4" dasharray="9,3" cap="butt" />
            </m>
            <m e="way" k="highway" v="steps">
                <line stroke="#F52D2D" width="0.4" dasharray="9,9" cap="butt" />
            </m>
            <m e="way" k="highway" v="track|byway">
                <line stroke="#F52D2D" width="1.1" dasharray="4,3" cap="butt" />
                <line stroke="#F52D2D" width="0.5" cap="butt" />
            </m>
        </m>
        <!-- endregion -->
        <!-- region not bridges -->
        <m k="bridge" v="~|no|false">
            <m e="way" k="highway" v="bridleway" zoom-min="13">
                <line cat="bolt2" stroke="#00008b" width="1" dasharray="3,3" cap="round" />
                <line cat="bolt2" stroke="#00008b" width="0.5" cap="round" />
            </m>
            <m e="way" k="highway" v="service" zoom-min="13">
                <line cat="bolt2" stroke="#FFFFFF" outline="bolt2-minor-roads" width="1.3" />
            </m>
            <m e="way" k="highway" v="construction" zoom-min="10">
                <line cat="bolt2" stroke="#FF0000" width="2" dasharray="15,2" cap="butt" />
            </m>
            <m e="way" k="highway" v="residential|living_street|road|unclassified" zoom-min="13">
                <line cat="bolt2" stroke="#FFFFFF" outline="bolt2-major-roads" width="1.3" />
            </m>
            <m e="way" k="highway" v="residential|living_street|road|unclassified" zoom-min="10" zoom-max="12">
                <line cat="bolt2" stroke="#FFFFFF" outline="bolt2-major-roads" width="1.5" />
            </m>
            <m e="way" k="highway" v="tertiary|tertiary_link|secondary_link|secondary" zoom-min="9">
                <pathText display="always" cat="bolt2-disabled" fill="#000000" k="name" font-family="sans_serif" font-style="bold" priority="2" size="16" stroke="#ffffff" stroke-width="2.0" zoom-min="14" />
                <line cat="bolt2" outline="bolt2-major-roads" stroke="#FFFF00" width="2.5" />
            </m>
            <m e="way" k="highway" v="primary_link|trunk_link|motorway_link|primary|trunk" zoom-min="9">
                <pathText display="always" cat="bolt2" fill="#000000" k="ref" font-family="sans_serif" font-style="bold" priority="2" size="16" stroke="#ffffff" stroke-width="4.0" />
                <line cat="bolt2" outline="bolt2-major-roads" stroke="#FFAA00" width="2.5" />
            </m>
            <m e="way" k="highway" v="motorway" zoom-min="12">
                <pathText display="always" cat="bolt2" fill="#000000" k="ref" font-family="sans_serif" font-style="bold" priority="2" size="16" stroke="#ffffff" stroke-width="4.0" />
                <line cat="bolt2" outline="bolt2-highway" stroke="#AA5500" width="3.5"/>
            </m>
            <m e="way" k="highway" v="motorway" zoom-min="8" zoom-max="11">
                <pathText display="always" cat="bolt2" fill="#000000" k="ref" font-family="sans_serif" font-style="bold" priority="2" size="16" stroke="#ffffff" stroke-width="4.0" />
                <line cat="bolt2" outline="bolt2-highway" stroke="#AA5500" width="4"/>
            </m>
        </m>
        <!-- endregion -->
        <!-- region tracks -->
        <m cat="trails-osm" k="access" v="-|private">
            <m e="way" k="highway" v="footway|pedestrian" zoom-min="13">
                <m k="bicycle" v="yes|designated">
                    <line use="bolt2-footpath-bicycle" />
                </m>
                <line use="bolt2-footpath" />
            </m>
            <m e="way" k="highway" v="steps" zoom-min="14">
                <line use="bolt2-steps" />
            </m>
            <m cat="trails-osm" e="way" k="highway" v="cycleway" zoom-min="12" select="first">
                <!-- cycleways can be paved or raw -->
                <m k="surface" v="bic_unpaved">
                    <line use="bolt2-track-raw-cycle" />
                </m>
                <m k="highway" v="cycleway">
                    <line use="bolt2-cycle" outline="bolt2-bikepath" />
                </m>
            </m>
            <m e="way" k="highway" v="path" zoom-min="12" select="first">
                <m k="bicycle" v="bic_yes|bic_designated | bic_permissive">
                    <!-- specifically for cycle -->
                    <m k="surface" v="bic_paved">
                        <line use="bolt2-trail" outline="bolt2-bikepath"/>
                    </m>
                </m>
                <m k="surface" v="bic_paved">
                    <line use="bolt2-track-paved" />
                </m>
                <m k="foot" v="ft_yes|foot_designated" zoom-min="13">
                    <!-- specifically for foot -->
                    <line use="bolt2-footpath" />
                </m>
                <m k="highway" v="path" zoom-min="13">
                    <!-- remainder -->
                    <line use="bolt2-footpath" />
                </m>
            </m>
            <m e="way" k="highway" v="byway" zoom-min="13" select="first">
                <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                    <line use="bolt2-byway-track"/>
                    <line use="bolt2-byway-track-solid"/>
                </m>
                <m k="bicycle" v="~">
                    <line use="bolt2-byway-track"/>
                    <line use="bolt2-byway-track-solid"/>
                </m>
                <!-- Default style for byways to ensure blue dashes -->
                <line use="bolt2-byway-track"/>
                <line use="bolt2-byway-track-solid"/>
            </m>
            <!-- Tracks section -->
            <m e="way" k="highway" v="track" 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|bic_permissive">
                        <line use="bolt2-byway-track"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                    <m k="bicycle" v="~">
                        <line use="bolt2-byway-track-no-access"/>
                        <line use="bolt2-byway-track-solid-no-access"/>
                    </m>
                </m>
                <m zoom-min="13">
                    <m k="tracktype" v="grade2">
                        <!-- Solid but unpaved. Usually an unpaved track with surface of gravel. -->
                        <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                            <line use="bolt2-byway-track"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                        <m k="bicycle" v="~">
                            <line use="bolt2-byway-track-no-access"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                    </m>
                    <m k="tracktype" v="grade3">
                        <!-- Mostly solid. Even mixture of hard and soft materials. -->
                        <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                            <line use="bolt2-byway-track"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                        <m k="bicycle" v="~">
                            <line use="bolt2-byway-track-no-access"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                    </m>
                    <m k="tracktype" v="grade4">
                        <!-- Mostly soft. Almost always an unpaved track prominently with soil/sand/grass,
              but with some hard or compacted materials mixed in. -->
                        <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                            <line use="bolt2-byway-track"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                        <m k="bicycle" v="~">
                            <line use="bolt2-byway-track-no-access"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                    </m>
                    <m k="tracktype" v="grade5">
                        <!-- Soft. Almost always an unimproved track lacking hard materials,
              same as surrounding soil.
              eg. -27.611406,153.165486 -->
                        <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                            <line use="bolt2-byway-track"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                        <m k="bicycle" v="~">
                            <line use="bolt2-byway-track-no-access"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                    </m>
                    <m k="highway" v="path">
                        <!--  other paths that haven't already matched -->
                        <line use="bolt2-footpath" />
                    </m>
                    <m e="way" k="tracktype" v="~" select="first">
                        <!--  other tracks that haven't already matched -->
                        <m k="bicycle" v="bic_yes|bic_designated|bic_permissive">
                            <line use="bolt2-byway-track"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                        <m k="bicycle" v="~">
                            <line use="bolt2-byway-track-no-access"/>
                            <line use="bolt2-byway-track-solid-no-access"/>
                        </m>
                        <m k="foot" v="ft_yes|foot_designated">
                            <!-- specifically for foot -->
                            <line use="bolt2-footpath" dasharray="4,3" />
                        </m>
                    </m>
                </m>
                <!-- Default style for tracks to ensure black dashes -->
                <line use="bolt2-byway-track-no-access"/>
        <line use="bolt2-byway-track-solid-no-access"/>
            </m>
        </m>
        <!-- endregion -->
        <!-- region bridges -->
        <m k="bridge" v="yes|true">
            <m e="way" k="highway" v="bridleway" zoom-min="12">
                <line outline="bridge_small" cap="butt" stroke="#FFFFFF" width="1.2" />
            </m>
            <m e="way" k="highway" v="service" zoom-min="12">
                <line outline="bridge_small" cap="butt" stroke="#FFFFFF" width="1.3" />
            </m>
            <m e="way" k="highway" v="construction">
                <line outline="bridge" cap="butt" stroke="#FF0000" width="1.3" dasharray="15,2" />
            </m>
            <m e="way" k="highway" v="unclassified|residential|living_street|road" zoom-min="12">
                <line outline="bridge" cap="butt" stroke="#FFFFFF" width="2" />
            </m>
            <m e="way" k="highway" v="tertiary|tertiary_link|secondary_link|secondary" zoom-min="12">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#FFFF00" width="2.5" />
            </m>
            <m e="way" k="highway" v="primary_link|trunk_link|primary|trunk" zoom-min="12">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#FFAA00" width="2.5" />
            </m>
            <m e="way" k="highway" v="trunk" zoom-max="12" zoom-min="11">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#FFAA00" width="3" />
            </m>
            <m e="way" k="highway" v="motorway_link" zoom-min="12">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#AA5500" width="2.5" />
            </m>
            <m e="way" k="highway" v="motorway" zoom-min="12">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#AA5500" width="3.5" />
            </m>
            <m e="way" k="highway" v="motorway_link" zoom-min="8" zoom-max="11">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#AA5500" width="2.5" />
            </m>
            <m e="way" k="highway" v="motorway" zoom-min="8" zoom-max="11">
                <line cat="bolt2" outline="bridge" cap="butt" stroke="#AA5500" width="4" />
            </m>
        </m>
        <!-- endregion -->
    </m>
</m>
<!-- endregion highway -->
<!-- railway (no tunnel) -->
<m k="railway" zoom-min="11">
    <m k="tunnel" v="~|false|no">
        <m v="rail">
            <line cap="butt" fade="12" fix="true" stipple="15" stipple-stroke="#ffffff" stipple-width="0.7" stroke="#000000" width="3" />
        </m>
    </m>
</m>
<!-- endregion railway -->
<!-- region place captions -->
<m k="place">
    <m v="suburb" zoom-max="14">
        <caption style="bold_italic" fill="#000000" k="name" priority="4" size="17" stroke="#ffffff" stroke-width="2.0" />
    </m>
    <m v="village" zoom-max="14">
        <caption style="bold" fill="#000000" k="name" priority="3" size="17" stroke="#ffffff" stroke-width="2.0" />
    </m>
    <m v="island" zoom-min="10">
        <caption style="bold" fill="#000000" k="name" priority="1" size="20" stroke="#ffffff" stroke-width="2.0" />
    </m>
    <m v="town">
        <caption style="bold" fill="#000000" k="name" priority="2" size="19" stroke="#ffffff" stroke-width="2.0" />
    </m>
    <m v="city">
        <m zoom-min="7">
            <caption style="bold" dy="14" fill="#000000" k="name" priority="1" size="19" stroke="#ffffff" stroke-width="2.0" />
        </m>
        <m zoom-max="6">
            <caption dy="14" fill="#000000" k="name" priority="1" size="19" />
        </m>
    </m>
    <m v="country">
        <caption style="bold" fill="#000000" k="name" priority="0" size="20" stroke="#ffffff" stroke-width="2.0" />
    </m>
</m>
<!-- endregion place -->
<m zoom-min="13">
    <m k="amenity">
        <m v="fuel">
            <symbol src="icons/fuel.svg" symbol-percent="100"/>
        </m>
        <m v="cafe">
            <symbol src="icons/cafe.svg" symbol-percent="100"/>
        </m>
        <m v="drinking_water">
            <symbol src="icons/drinking_water.svg" symbol-percent="100"/>
        </m>
        <m v="parking">
            <symbol src="icons/parking.svg" symbol-percent="100"/>
        </m>
    </m>
    <m k="shop">
        <m v="bakery">
            <symbol src="icons/bakery.svg" symbol-percent="100"/>
        </m>
        <m v="bicycle">
            <symbol src="icons/shop_bicycle.svg" symbol-percent="100"/>
        </m>
    </m>
    <m k="railway" v="station|stop">
        <symbol src="icons/train_station.svg" symbol-percent="100"/>
    </m>
    <m k="barrier">
        <m v="gate">
            <symbol src="icons/gate.svg" symbol-percent="100"/>
        </m>
        <m v="stile">
            <symbol src="icons/stile.svg" symbol-percent="100"/>
        </m>
        <m v="swing_gate">
            <symbol src="icons/gate.svg" symbol-percent="100"/>
        </m>
        <m v="kissing_gate">
            <symbol src="icons/kissing_gate.svg" symbol-percent="100"/>
        </m>
    </m>
</m>

`

Roryplewes commented 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">

`

Ebe66 commented 2 months ago

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

Roryplewes commented 2 months ago

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?

Ebe66 commented 2 months ago

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.

Roryplewes commented 2 months ago

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">

` I still cant seem to upload files into the onedrive so above is my render theme. I am also going to try what you have suggested by chaning what information is generated on the map at download so that the render theme can use it. So I have added these files to the WahooMapsCreatorData folder in Config tags-to-keep.json `{ "TAGS_TO_KEEP_UNIVERSAL": { "access": "", "area": "yes", "bicycle": "", "bridge": "", "foot": [ "ft_yes", "foot_designated" ], "amenity": [ "fuel", "cafe", "drinking_water", "shelter" ], "barrier": [ "bollard", "cycle_barrier", "lift_gate", "toll_booth", "stile", "swing_gate", "kissing_gate", ], "shop": [ "bakery", "bicycle" ], "highway": [ "abandoned", "bus_guideway", "disused", "bridleway", "byway", "construction", "cycleway", "footway", "living_street", "motorway", "motorway_link", "path", "pedestrian", "primary", "primary_link", "residential", "road", "secondary", "secondary_link", "service", "steps", "tertiary", "tertiary_link", "track", "designation", "trunk", "trunk_link", "unclassified" ], "natural": [ "coastline", "nosea", "sea", "beach", "land", "scrub", "water", "wetland", "wood" ], "landuse": [ "forest", "commercial", "industrial", "residential", "retail" ], "leisure": [ "park", "nature_reserve" ], "railway": [ "rail", "tram", "station", "stop" ], "surface": "", "tracktype": "", "tunnel": "", "waterway": [ "canal", "drain", "river", "riverbank", "stream" ], "wood": "deciduous", "tourism": "alpine_hut" }, "NAME_TAGS_TO_KEEP_UNIVERSAL": { "admin_level": "2", "area": "yes", "mountain_pass": "", "natural": "", "place": [ "city", "hamlet", "island", "isolated_dwelling", "islet", "locality", "suburb", "town", "village", "country" ] } }` Then created a subfolder of config (tag_wahoo_adjusted) with these files: tag-wahoo-poi.xml ` ` and also tag-wahoo.xml ` `
Ebe66 commented 2 months ago

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).

Roryplewes commented 2 months ago

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?

Roryplewes commented 2 months ago

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

Roryplewes commented 2 months ago

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.

Roryplewes commented 2 months ago

Added the wrong VTM. Here is the one I want to use for Byways. [Uploading vtm-elemnt byways and tracks (TBC).xml.zip…]()

Roryplewes commented 2 months ago

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 main.run("run") File "/opt/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/main.py", line 76, in run o_osm_maps.filter_tags_from_country_osm_pbf_files() File "/opt/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/osm_maps_functions.py", line 396, in filter_tags_from_country_osm_pbf_files cmd.extend(translate_tags_to_keep( File "/opt/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/constants_functions.py", line 53, in translate_tags_to_keep tags_from_json = read_json_file_generic(path) File "/opt/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/file_directory_functions.py", line 89, in read_json_file_generic json_content = json.load(json_file) File "/opt/anaconda3/envs/gdal-user/lib/python3.10/json/init.py", line 293, in load return loads(fp.read(), File "/opt/anaconda3/envs/gdal-user/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/opt/anaconda3/envs/gdal-user/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/anaconda3/envs/gdal-user/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 25 column 2 (char 473)

Ebe66 commented 2 months ago

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.

Roryplewes commented 2 months ago

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.

vtm-elemnt byways and tracks (TBC).xml.zip

Roryplewes commented 2 months ago

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. πŸ₯³πŸ˜„

Ebe66 commented 2 months ago

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.

Roryplewes commented 2 months ago

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?

Roryplewes commented 2 months ago

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

Roryplewes commented 2 months ago

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.

Ebe66 commented 2 months ago

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 :-)

Roryplewes commented 2 months ago

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

Roryplewes commented 2 months ago

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.

Ebe66 commented 2 months ago

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 image

Roryplewes commented 2 months ago

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.