Skip to content

Commit

Permalink
#3: JOSM presets examples added
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Dec 7, 2022
1 parent fb7525c commit 8fca762
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 3 deletions.
37 changes: 34 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@ <h3>Wiki Infobox Tag</h3>
<section>
<h2>Presets</h2>
<p>See <a href="https://wiki.openstreetmap.org/wiki/Preset">https://wiki.openstreetmap.org/wiki/Preset</a>.</p>

<!--
- About unifying presets
- https://github.com/osmlab/editor-presets/issues/1
- https://github.com/osmlab/osm-planning/issues/27#issuecomment-1018930029
- https://github.com/openstreetmap/id-tagging-schema/issues/646
-->

<section>
<h3>iD style presets</h3>
<ul>
Expand All @@ -349,9 +357,32 @@ <h3>iD style presets</h3>
</section>
<section>
<h3>JOSM style presets</h3>
<p>See <a
href="https://wiki.openstreetmap.org/wiki/Customising_JOSM_Presets">https://wiki.openstreetmap.org/wiki/Customising_JOSM_Presets</a>.
</p>
<div class="issue" data-number="3">
Opinions are welcome.
</div>
<ul>
<li>
<a href="https://josm.openstreetmap.de/wiki/TaggingPresets">
https://josm.openstreetmap.de/wiki/TaggingPresets
</a>
</li>
<li>
<a href="https://wiki.openstreetmap.org/wiki/Customising_JOSM_Presets">
https://wiki.openstreetmap.org/wiki/Customising_JOSM_Presets
</a>
</li>
<li>
<a href="http://josm.openstreetmap.de/tagging-preset-1.0">
http://josm.openstreetmap.de/tagging-preset-1.0
</a>
</li>
</ul>
<pre class="example" title="A JSOM Preset (canonical) reference, preset-josm-hello" data-content-type="xml"
data-oninclude="escapeExample" data-include="reference/preset/preset-josm-hello.xml">
</pre>
<pre class="example" title="A JSOM Preset (canonical) reference, preset-josm-gas" data-content-type="xml"
data-oninclude="escapeExample" data-include="reference/preset/preset-josm-gas.xml">
</pre>
</section>
<section>
<h3>OsmAnd style presets</h3>
Expand Down
4 changes: 4 additions & 0 deletions poc/tests-simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,7 @@ echo ""

jsonschema --instance tests/data/C0003.json temp-schema/osm.schema.json
set -x


# @TODO - http://tagfinder.herokuapp.com/apidoc
# - http://tagfinder.herokuapp.com/tagfinder_thesaurus.rdf
6 changes: 6 additions & 0 deletions proposal/shacl/XZ_relation_empty-relations.shacl.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# @see https://wiki.openstreetmap.org/wiki/Empty_relations
# @see overpass equivalent https://overpass-turbo.eu/s/1hot

# About discussion of automating this:
# - https://lists.openstreetmap.org/pipermail/talk/2021-April/086462.html
# - (idea about detect clusters) https://lists.openstreetmap.org/pipermail/talk/2021-April/086476.html
25 changes: 25 additions & 0 deletions reference/preset/preset-josm-gas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0">
<!-- Example from https://wiki.openstreetmap.org/wiki/Customising_JOSM_Presets -->
<item name="Petrol / Gas Station">
<link href="https://wiki.openstreetmap.org/wiki/DE:Tag:amenity=fuel" />
<label text="Tankstelle" />
<key key="amenity" value="fuel" />
<combo key="name" text="Name" values="Shell,BP,Esso,Murco" default="" />
<combo key="brand" text="Brand" values="Shell,BP,Esso,Murco" default="" />
<check key="fuel:diesel" text="Diesel" />
<check key="fuel:octane_91" text="Petrol 91 octane " />
<check key="fuel:octane_95" text="Petrol 95 octane" />
<check key="fuel:octane_98" text="Petrol 98 octane" />
<check key="fuel:biogas" text="Biogas" />
<check key="fuel:lpg" text="LPG" />
<check key="fuel:hydrogen" text="Wasserstoff" />
<check key="fuel:electricity" text="Charger for electric cars" />
<optional>
<text key="opening hours" text="Opening Hours" default="" />
<link href="https://wiki.openstreetmap.org/wiki/Key:opening_hours?uselang=en" />
<check key="payment:maestro_card" text="Master-Card" default="off" />
<check key="payment:banknotes" text="Cash" default="off" />
</optional>
</item>
</presets>
16 changes: 16 additions & 0 deletions reference/preset/preset-josm-hello.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0">
<item name="Oneway highway" type="way">
<label text="Inserting a unidirectional highway" />

<combo key="highway" text="Type" values="trunk,motorway" />
<text key="name" text="Name (e.g. Angel Road)" />
<text key="ref" text="Ref (e.g. A406)" />

<!-- This is a oneway preset, so make oneway default -->
<check key="oneway" text="Oneway" default="on" />

<!-- Always setting asphalt surface -->
<key key="surface" value="asphalt" />
</item>
</presets>

0 comments on commit 8fca762

Please sign in to comment.