<?xml version="1.0" encoding="utf-8"?>
<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"
  author="achadwick"
  description="Public rights of way in England and Wales, using the good bits out of the global tagging style while retaining our ancient folkways and customs."
  shortdescription="Rights of way in England and Wales"
  version="0.12_2024-06-23"
  icon="sign_footpath.svg"
>

<!--
Implements https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines


*General goals*

These presets should be sufficient for clearly marked footpaths in rural
contexts which may or may not follow farm tracks, and for pedestrian
cut-throughs in towns.

This doesn't try to impose highway=path everywhere, but is still close in
spirit to the "global tagging scheme" shown on the wiki. I use dedecated
types where they would make sense, but also mix in highway=track and
highway=unclassified where those are more appropriate for the physical
aspects of the route. Continuity of RoW tagging along a way is represented
by continuity of the designation=* and *=designated tags.

Given the nature of E+W rights of way and historical OSM usage, public
paths in England and Wales with markers can almost always can be expressed
as highway=bridleway or highway=footway, and unless they have the character
of a rough farm track or actually follow a minor road they probably should
be. Almost no marked RoW needs highway=path, the exception being marked
permissive paths narrower than a rough farm track where the landowner
allows bikes.

-->

  <group name="Rights of way" icon="sign_footpath.svg">

    <item name="Public footpath"
      type="way"
      icon="arrow_public_footpath.svg"
      preset_name_label="true"
    >
      <label text="Public footpath, often waymarked with yellow arrows." />
      <label text="Only use if there's unambiguous 'Public footpath' signage"/>
      <label text="or if the source can be used to verify the legal status."/>
      <space/>

      <!-- what makes it this kind of RoW, mandatory -->
      <key key="designation" value="public_footpath" />
      <key key="foot" value="designated" />

      <!-- physical type or degree of importance, list only isolated types -->
      <combo text="Physical aspect"
        key="highway" 
        values="footway,steps,track"
        display_values="Simple marked footpath,Steps forming part of footpath,Follows rough vehicle track"
        default="footway"
        required="true" />
      <label text="The values above are useful for isolated paths, but are"/>
      <label text="not the only possibilities. Feel free to combine with"/>
      <label text="other presets if the RoW is along a public road, say."/>
      <space/>

      <!--
        There may be evidence of vehicular or horse rider usage too.
        Typically some flavour of private and guessed from tracks.
      -->
      <combo text="Horse rider access"
        key="horse"
        values="no,private,permissive" default="no"
        required="false" />
      <combo text="Vehicular access"
        key="vehicle"
        values="no,agricultural,forestry,private,permissive" default="no"
        required="false" />

      <!-- Optional extras -->
      <optional>
        <combo key="surface" text="Surface type"
          values="paved,unpaved,asphalt,gravel,ground,grass,"
          delete_if_empty="true" />
        <combo text="Lit" key="lit"
          values=",yes,no"
          display_values="Unknown,Yes,No"
          delete_if_empty="true" />
        <combo text="Build quality" 
          key="tracktype" default="" delete_if_empty="true"
          values=",grade1,grade2,grade3,grade4,grade5"
          display_values="Unknown,
Paved or heavily compacted,
Gravel or densely packed,
Even mix of hard &amp; soft,
Mostly bare; partly solid,
Bare ground"
          />
        <text text="Width (metres)" key="width" />
      </optional>
      <link href="https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines" />
    </item>

    <item name="Public bridleway"
      type="way"
      icon="arrow_bridleway.svg"
      preset_name_label="true"
    >
      <label text="Public bridleway, often waymarked in blue."/>
      <label text="These are trails or paths for use by horse riders and"/>
      <label text="on foot. Cyclists may use them, but they are not required"/>
      <label text="to be kept usable by bicycles."/>
      <space />
      <label text="Only use if there's unambiguous 'bridleway' signage or"/>
      <label text="if the source can be used to verify the legal status."/>
      <space/>

      <!-- what makes it a RoW, mandatory -->
      <key key="designation" value="public_bridleway" />
      <key key="horse" value="designated" />
      <key key="foot" value="designated" />

      <!-- Variable things -->
      <key key="bicycle" value="yes" />
      <combo
        key="bicycle"
        text="Bicycle"
        values="designated,yes,dismount,discouraged"
        editable="true"
        default="designated"
      />
      <label text="Bridleways are legal for use by cyclists, but are not"/>
      <label text="legally required to be maintained for their use."/>
      <space/>

      <!-- physical type or degree of importance, list only isolated types -->
      <combo key="highway" text="Physical aspect"
        values="bridleway,track"
        display_values="Simple marked bridleway,Follows rough vehicle track"
        default="bridleway" delete_if_empty="false" />
      <label text="The values above are useful for isolated bridleways, but"/>
      <label text="aren't the only possibilities. Feel free to combine with"/>
      <label text="other presets if the RoW is along a public road, say."/>
      <space/>

      <!--
        There may be evidence of vehicular usage too.
        Typically some flavour of private and guessed from tracks.
      -->
      <combo text="Vehicular access"
        key="vehicle"
        values="no,agricultural,forestry,private,permissive" default="no"
        required="false" />

      <!-- Optional extras -->
      <optional>
        <combo key="surface" text="Surface type"
          values="paved,unpaved,asphalt,gravel,ground,grass,"
          default="" delete_if_empty="true" />
        <combo key="lit" text="Lit"
          values=",yes,no" display_values="Unknown,Yes,No"
          default="" delete_if_empty="true" />
        <combo key="tracktype" default="" delete_if_empty="true"
          values=",grade1,grade2,grade3,grade4,grade5"
          display_values="Unknown,
Paved or heavily compacted,
Gravel or densely packed,
Even mix of hard &amp; soft,
Mostly bare; partly solid,
Bare ground"
          text="Build quality" />
        <text text="Width (metres)" key="width" />
      </optional>
      <link href="https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines" />
    </item>

    <item name="Byway"
      type="way"
      icon="arrow_byway.svg"
      preset_name_label="true"
    >
      <label text="Byway Open To All Traffic, or BOAT. Red markers, often."/>
      <label text="These are minor roads which the public have a right to"/>
      <label text="travel on, but which are mainly used like footpaths and"/>
      <label text="bridleways. They have may have varying states of repair."/>
      <space />
      <label text="Only use if there's unambiguous 'byway' signage or"/>
      <label text="if the source can be used to verify the legal status."/>
      <space />

      <!-- what makes it a RoW, mandatory -->
      <key key="designation" value="byway_open_to_all_traffic" />
      <key key="foot" value="designated" />
      <key key="horse" value="designated" />
      <key key="vehicle" value="yes" />
      <key key="bicycle" value="designated" />
      <!--
        Rationale: the Road Traffic Regulation Act 1984, section 15(9)(c)
        states that a BOAT is "[...] a highway over which the public have a
        right of way [access=yes] for vehicular and all other kinds of traffic
        but which is used by the public mainly for the purpose for which
        footpaths and bridleways are used [access=designated]". Bicycles were
        probably using bridleways commonly by 1984, so they are designated.
      -->

      <!-- physical type or degree of importance, list only isolated types -->
      <combo key="highway" text="Physical aspect"
        values="track,unclassified"
        display_values="Rough track,Well-surfaced minor road"
        default="track" delete_if_empty="false" />
      <label text="If you choose the 'minor road' option, please also specify"/>
      <label text="the number of lanes."/>
      <space />
      <optional>
        <combo text="Number of lanes"
          key="lanes"
          values="1,2" />
        <combo key="surface" text="Surface type"
          values="paved,unpaved,asphalt,gravel,ground,grass,"
          default="" delete_if_empty="true" />
        <combo key="lit" text="Lit"
          values=",yes,no" display_values="Unknown,Yes,No"
          default="" delete_if_empty="true" />
        <combo key="tracktype" default="" delete_if_empty="true"
          values=",grade1,grade2,grade3,grade4,grade5"
          display_values="Unknown,
Paved or heavily compacted,
Gravel or densely packed,
Even mix of hard &amp; soft,
Mostly bare; partly solid,
Bare ground"
          text="Build quality" />
        <text text="Width (metres)" key="width" />
      </optional>
      <link href="https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines" />
    </item>

    <item name="Restricted Byway"
      type="way"
      icon="arrow_restricted_byway.svg"
      preset_name_label="true"
    >
      <label text="Restricted Byway, often marked with purple arrows."/>
      <label text="These are minor roads open to non-motorized traffic"/>
      <label text="with often highly varying states of repair."/>
      <space/>
      <label text="Only use if there's unambiguous 'restricted byway' signage"/>
      <label text="or if the source can be used to verify the legal status."/>
      <space />

      <!-- what makes it a RoW, mandatory -->
      <key key="designation" value="restricted_byway"/>
      <key key="foot" value="designated"/>
      <key key="horse" value="designated"/>
      <key key="vehicle" value="yes"/>
      <key key="bicycle" value="designated"/>
      <!--
        Rationale: the Countryside and Rights of Way Act 2000, Section 48(4)
        actually lists'n'designates specific restricted byway rights:

        "(a) a right of way on foot, (b) a right of way on horseback or leading
         a horse, and (c) a right of way for vehicles other than mechanically
         propelled vehicles"

        A quick sampling of some council websites describe them as commonly
        unsuitable for motor vehicles. Common enough to be an un-designation.
        In practice, this all boils down to being the same as for ordinary
        Byways, but motor vehicles are prohibited (save for owner/access uses;
        see below).
      -->

      <!-- physical type or degree of importance, list only isolated types -->
      <combo key="highway" text="Physical aspect"
        values="track,unclassified"
        display_values="Rough track,Well-surfaced minor road"
        default="track" delete_if_empty="false" />
      <label text="If you choose the 'minor road' option, please also specify"/>
      <label text="the number of lanes."/>
      <space />

      <!--
        There may be evidence of motor vehicle usage too.
        Typically some flavour of private and guessed from tracks.
      -->
      <combo text="Motor vehicle access"
        key="motor_vehicle"
        values="no,agricultural,forestry,private,permissive" default="no"
        required="false" />

      <optional>
        <combo text="Number of lanes"
          key="lanes"
          values="1,2" />
        <combo key="surface" text="Surface type"
          values="paved,unpaved,asphalt,gravel,ground,grass,"
          default="" delete_if_empty="true" />
        <combo key="lit" text="Lit"
          values=",yes,no" display_values="Unknown,Yes,No"
          default="" delete_if_empty="true" />
        <combo key="tracktype" default="" delete_if_empty="true"
          values=",grade1,grade2,grade3,grade4,grade5"
          display_values="Unknown,
Paved or heavily compacted,
Gravel or densely packed,
Even mix of hard &amp; soft,
Mostly bare; partly solid,
Bare ground"
          text="Build quality" />
      </optional>
      <link href="https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines" />
    </item>

    <item name="Permissive footpath"
      type="way"
      icon="arrow_permissive_path.svg"
      preset_name_label="true"
    >
      <label text="Permissive path for walkers. Waymarks: white arrows."/>
      <label text="These are paths the landowner has granted permission to"/>
      <label text="use which can be revoked. Syn: permitted/concessionary."/>
      <space/>
      <label text="Only use if there's unambiguous 'permissive' signage"/>
      <label text="or if the source can be used to verify the legal status."/>
      <space/>

      <!-- what makes it list kind of permissive path, mandatory -->
      <key key="designation" value="permissive_footpath"/>

      <!-- physical type or degree of importance, list only isolated types -->
      <combo key="highway" text="Physical aspect"
        values="footway,track,cycleway,unclassified"
        display_values="Simple footpath,Follows rough vehicle track,Smooth cycleway,Well-surfaced minor road"
        default="footway" delete_if_empty="false" />
      <label text="If you choose the 'minor road' option, please also specify"/>
      <label text="the number of lanes."/>
      <space/>

      <!-- Access -->
      <key key="foot" value="permissive"/>
      <combo text="Horse" key="horse" values="permissive" />
      <combo text="Bicycle" key="bicycle" values="permissive" />
      <space/>

      <!-- Optional extras -->
      <optional>
        <combo text="Number of lanes"
          key="lanes"
          values="1,2" />
        <combo key="surface" text="Surface type"
          values="paved,unpaved,asphalt,gravel,ground,grass,"
          default="" delete_if_empty="true" />
        <combo key="lit" text="Lit"
          values=",yes,no" display_values="Unknown,Yes,No"
          default="" delete_if_empty="true" />
        <combo key="tracktype" default="" delete_if_empty="true"
          values=",grade1,grade2,grade3,grade4,grade5"
          display_values="Unknown,
Paved or heavily compacted,
Gravel or densely packed,
Even mix of hard &amp; soft,
Mostly bare; partly solid,
Bare ground"
          text="Build quality" />
      </optional>
      <link href="https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines" />
    </item>

    <item name="Permissive bridleway"
      type="way"
      icon="arrow_permissive_path.svg"
      preset_name_label="true"
    >
      <label text="Permissive path for horse riders. Waymarks: white arrows."/>
      <label text="These are paths the landowner has granted permission to"/>
      <label text="use which can be revoked. Syn: permitted/concessionary."/>
      <space/>
      <label text="Only use if there's unambiguous 'permissive' signage"/>
      <label text="or if the source can be used to verify the legal status."/>
      <space/>

      <!-- what makes it list kind of permissive path, mandatory -->
      <key key="designation" value="permissive_bridleway"/>

      <!-- physical type or degree of importance, list only isolated types -->
      <combo key="highway" text="Physical aspect"
        values="bridleway,track,cycleway,unclassified"
        display_values="Simple bridleway,Follows rough vehicle track,Smooth cycleway,Well-surfaced minor road"
        default="bridleway" delete_if_empty="false" />
      <label text="If you choose the 'minor road' option, please also specify"/>
      <label text="the number of lanes."/>
      <space/>

      <!-- Access -->
      <key key="horse" value="permissive"/>
      <combo text="Foot" key="foot" values="permissive" default="permissive"/>
      <combo text="Bicycle" key="bicycle" values="permissive" />
      <space/>

      <!-- Optional extras -->
      <optional>
        <combo text="Number of lanes"
          key="lanes"
          values="1,2" />
        <combo key="surface" text="Surface type"
          values="paved,unpaved,asphalt,gravel,ground,grass,"
          default="" delete_if_empty="true" />
        <combo key="lit" text="Lit"
          values=",yes,no" display_values="Unknown,Yes,No"
          default="" delete_if_empty="true" />
        <combo key="tracktype" default="" delete_if_empty="true"
          values=",grade1,grade2,grade3,grade4,grade5"
          display_values="Unknown,
Paved or heavily compacted,
Gravel or densely packed,
Even mix of hard &amp; soft,
Mostly bare; partly solid,
Bare ground"
          text="Build quality" />
      </optional>
      <link href="https://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines" />
    </item>

    <!-- TODO: other permissive types? -->

  </group>

</presets>
