Changeset 14593 in josm for trunk


Ignore:
Timestamp:
2018-12-23T01:25:15+01:00 (4 months ago)
Author:
Klumbumbus
Message:

fix #15774 - Update emergency=fire_hydrant preset (based on patch by elgolfo and bus-mt), add a bunch of validator checks

Location:
trunk/data
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r14592 r14593  
    60566056                  pl.href="https://wiki.openstreetmap.org/wiki/Pl:Tag:emergency=fire_hydrant"
    60576057                  pt.href="https://wiki.openstreetmap.org/wiki/Pt:Tag:emergency=fire_hydrant"
    6058                   pt_BR.href="https://wiki.openstreetmap.org/wiki/Pt-br:Tag:emergency=fire_hydrant"
    60596058                  ru.href="https://wiki.openstreetmap.org/wiki/RU:Tag:emergency=fire_hydrant"
    60606059                  uk.href="https://wiki.openstreetmap.org/wiki/Uk:Tag:emergency=fire_hydrant" />
    60616060            <space />
    60626061            <key key="emergency" value="fire_hydrant" />
    6063             <combo key="fire_hydrant:type" text="Type" values="underground,pillar,wall,pond" values_context="pipeline" default="pillar" />
    6064             <combo key="fire_hydrant:diameter" text="Diameter (in mm)" values="50,80,100,150,200,250,300,400" />
    6065             <space />
    6066             <reference ref="name_ref" />
    6067             <text key="operator" text="Operator" />
    6068             <space />
    6069             <combo key="fire_hydrant:position" text="Hydrant Position" values="lane,parking_lot,sidewalk,green" values_context="hydrant position" />
    6070             <combo key="fire_hydrant:pressure" text="Pressure (in bar)" values="5,6,8,suction" />
    6071             <text key="fire_hydrant:count" text="Count" />
     6062            <combo key="fire_hydrant:type" text="Shape" values_searchable="true" values_context="pipeline" >
     6063                <list_entry value="pillar" short_description="A pillar type hydrant." />
     6064                <list_entry value="underground" short_description="A fire hydrant simple outlet located underground." />
     6065                <list_entry value="wall" short_description="A wall-mounted fire hydrant." />
     6066                <list_entry value="pipe" short_description="A simple capped pipe, without the usual hydrant shape." />
     6067            </combo>
     6068            <combo key="fire_hydrant:diameter" text="Diameter (mm)" values="50,70,75,80,100,110,125,150,200,250,300,400" />
     6069            <combo key="fire_hydrant:pressure" text="Pressure (bar) or suction" values_searchable="true" values_sort="false">
     6070                <list_entry value="#" short_description="Pressure in bar." />
     6071                <list_entry value="yes" short_description="Pressure but value unknown." />
     6072                <list_entry value="suction" short_description="Water is not pressurized, a pump is needed." />
     6073            </combo>
     6074            <optional>
     6075                <text key="ref" text="Reference" />
     6076                <combo key="water_source" text="Water source">
     6077                    <list_entry value="main" short_description="Hydrant is fed by the local distribution network." />
     6078                    <list_entry value="groundwater" short_description="A water well." />
     6079                    <list_entry value="stream" />
     6080                    <list_entry value="river" />
     6081                    <list_entry value="canal" />
     6082                    <list_entry value="drain" />
     6083                    <list_entry value="ditch" />
     6084                    <list_entry value="pond" />
     6085                    <list_entry value="lake" />
     6086                    <list_entry value="water_tank" />
     6087                    <list_entry value="swimming_pool" />
     6088                </combo>
     6089                <combo key="fire_hydrant:position" text="Hydrant Position" values_context="hydrant position" >
     6090                    <list_entry value="lane" short_description="on the side of a road lane" />
     6091                    <list_entry value="parking_lot" short_description="in a parking lot" />
     6092                    <list_entry value="sidewalk" short_description="on a sidewalk" />
     6093                    <list_entry value="green" short_description="in a grassy area" />
     6094                </combo>
     6095                <text key="flow_rate" text="Flow rate with unit of measure" />
     6096                <combo key="pillar:type" text="Pillar type">
     6097                    <list_entry value="dry_barrel" short_description="A style of pillar hydrant where the water shutoff valve is below ground." />
     6098                    <list_entry value="wet_barrel" short_description="A style of pillar hydrant where the barrel is pressurized at all times, with individual valves for each outlet." />
     6099                </combo>
     6100                <space />
     6101                <combo key="couplings" text="Number of couplings" values="1,2,3" />
     6102                <combo key="couplings:type" text="Coupling standard" values="Bayonet,Barcelona,Guillemin,Klaue,Sprawny,Storz,UNI" />
     6103                <text key="couplings:diameters" text="Each coupling diameter (separated by ;)" />
     6104                <space />
     6105                <combo key="colour" text="Colour" values="blue,green,red,yellow,grey" />
     6106                <combo key="bonnet:colour" text="Colour of the top section (bonnet)" values="blue,green,red,yellow,grey" />
     6107                <combo key="cap:colour" text="Colour of the caps" values="blue,green,red,yellow,grey" />
     6108                <space />
     6109                <text key="manufacturer" text="Manufacturer" />
     6110                <text key="operator" text="Operator" />
     6111                <text key="name" text="Name" />
     6112                </optional>
    60726113        </item> <!-- Fire Hydrant -->
    60736114        <item name="Water Tank" icon="presets/emergency/water_tank.svg" type="node,closedway" preset_name_label="true">
  • trunk/data/validator/combinations.mapcss

    r14364 r14593  
    8888
    8989/* {0.key} without {1.tag} */
     90node[fire_hydrant:type         ][emergency!=fire_hydrant][disused:emergency!=fire_hydrant],
    9091*[transformer                  ][!power],
    9192way[fence_type                 ][barrier!=fence],
     
    116117
    117118/* {0.tag} without {1.key} (warning level) */
     119node[emergency=fire_hydrant][!fire_hydrant:type],
    118120way[boundary=administrative][!admin_level],
    119121relation[boundary=administrative][!admin_level],
     
    526528  assertMatch: "way highway=primary lanes=3";
    527529}
     530
     531/* #15774 */
     532node[emergency=fire_hydrant][fire_hydrant:count][fire_hydrant:count!=1] {
     533  throwOther: tr("{0} together with {1}. Tag each hydrant separately.", "{0.tag}", "{1.tag}");
     534}
  • trunk/data/validator/deprecated.mapcss

    r14393 r14593  
    13381338  group: tr("deprecated tagging");
    13391339}
     1340
     1341/* #15774 */
     1342node[amenity=fire_hydrant] {
     1343  throwWarning: tr("{0} is deprecated", "{0.tag}");
     1344  suggestAlternative: "emergency=fire_hydrant";
     1345  fixChangeKey: "amenity => emergency";
     1346  group: tr("deprecated tagging");
     1347}
     1348node[fire_hydrant:type=pond] {
     1349  throwWarning: tr("{0} is deprecated", "{0.tag}");
     1350  suggestAlternative: "water_source=pond";
     1351  fixAdd: "water_source=pond";
     1352  fixRemove: "{0.key}";
     1353  group: tr("deprecated tagging");
     1354}
     1355node[fire_hydrant:flow_capacity] {
     1356  throwWarning: tr("{0} is deprecated", "{0.key}");
     1357  suggestAlternative: "flow_rate";
     1358  group: tr("deprecated tagging");
     1359}
     1360node[emergency=fire_hydrant][in_service=no] {
     1361  throwWarning: tr("{0} is deprecated", "{1.tag}");
     1362  suggestAlternative: "disused:emergency=fire_hydrant";
     1363  fixAdd: "disused:emergency=fire_hydrant";
     1364  fixRemove: "{1.key}";
     1365  fixRemove: "{0.key}";
     1366  group: tr("deprecated tagging");
     1367}
     1368node[fire_hydrant:water_source] {
     1369  throwWarning: tr("{0} is deprecated", "{0.key}");
     1370  suggestAlternative: "water_source";
     1371  fixChangeKey: "fire_hydrant:water_source => water_source";
     1372  group: tr("deprecated tagging");
     1373}
  • trunk/data/validator/geometry.mapcss

    r14577 r14593  
    9393
    9494/* {0} on a way, should be a node */
     95way[emergency=fire_hydrant],
    9596way[entrance],
    9697way[door],
  • trunk/data/validator/ignoretags.cfg

    r14580 r14593  
    181181K:allotments=plot
    182182K:land_area=administrative
     183K:fire_hydrant:pressure
    183184;
    184185; Highway Key/Value Pairs
  • trunk/data/validator/numeric.mapcss

    r14359 r14593  
    334334  assertNoMatch: "node ele=4";
    335335}
    336 *[ele][ele !~ /^-?[0-9]+(\.[0-9]+)?$/]!.ele_meter_remove_autofix!.ele_separator_autofix{
     336*[ele][ele !~ /^-?[0-9]+(\.[0-9]+)?$/]!.ele_meter_remove_autofix!.ele_separator_autofix {
    337337  throwWarning: tr("{0} must be a numeric value, in meters and without units", "{0.key}");
    338338  assertNoMatch: "node ele=12m";
     
    344344  assertMatch: "node ele=high";
    345345}
     346
     347/* #15774 */
     348node[fire_hydrant:pressure="#"] {
     349  throwError: tr("unusual value of {0}", "{0.key}");
     350}
  • trunk/data/validator/unnecessary.mapcss

    r13378 r14593  
    6565  group: tr("unnecessary tag");
    6666}
     67
     68/* #15774 */
     69node[emergency=fire_hydrant][fire_hydrant:count=1] {
     70  throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
     71  group: tr("unnecessary tag");
     72  fixRemove: "{1.key}";
     73}
Note: See TracChangeset for help on using the changeset viewer.