Ticket #22957: 0001-Deprecated-tag-parking-orientation.patch

File 0001-Deprecated-tag-parking-orientation.patch, 3.6 KB (added by JeroenHoek, 3 years ago)

Patch adressing this issue

  • resources/data/defaultpresets.xml

    From 384cf20b33f173da25e6fe2fe0388a3685ece6ec Mon Sep 17 00:00:00 2001
    From: Jeroen Hoek <mail@jeroenhoek.nl>
    Date: Thu, 18 May 2023 18:29:07 +0200
    Subject: [PATCH] Deprecated tag `parking:orientation`
    
    `parking:orientation` is replaced by `orientation`. This commit
    introduces a depracation warning and updates the preset.
    ---
     resources/data/defaultpresets.xml          |  4 ++--
     resources/data/validator/deprecated.mapcss | 19 +++++++++++++++++++
     resources/data/validator/ignoretags.cfg    |  1 +
     3 files changed, 22 insertions(+), 2 deletions(-)
    
    diff --git a/resources/data/defaultpresets.xml b/resources/data/defaultpresets.xml
    index b8bd02683..97bfd33e6 100644
    a b  
    27732773            <reference ref="supervised_lit_oh" />
    27742774            <space />
    27752775            <label text="Only for street side parking: "/>
    2776             <combo key="parking:orientation" text="Orientation" values="diagonal,parallel,perpendicular" />
     2776            <combo key="orientation" text="Orientation" values="diagonal,parallel,perpendicular" />
    27772777        </item> <!-- Parking -->
    27782778        <item name="Parking Space" icon="presets/vehicle/parking/parking_space.svg" type="node,closedway" preset_name_label="true">
    27792779            <link wiki="Tag:amenity=parking_space" />
     
    29762976            <check key="covered" text="Covered (with roof)" />
    29772977            <space />
    29782978            <label text="Only for street side parking: "/>
    2979             <combo key="parking:orientation" text="Orientation" values="diagonal,parallel,perpendicular" />
     2979            <combo key="orientation" text="Orientation" values="diagonal,parallel,perpendicular" />
    29802980        </item> <!-- Parking -->
    29812981        <item name="Motorcycle Dealer" icon="presets/vehicle/motorbike.svg" type="node,closedway,multipolygon" preset_name_label="true">
    29822982            <link wiki="Tag:shop=motorcycle" />
  • resources/data/validator/deprecated.mapcss

    diff --git a/resources/data/validator/deprecated.mapcss b/resources/data/validator/deprecated.mapcss
    index 5a195d181..1a5aa2c04 100644
    a b way[shoulder=none] {  
    24642464  assertNoMatch: "node historic=archaeological_site site_type2=fortification";
    24652465}
    24662466
     2467/* Tag was renamed, see #22957 */
     2468area[parking:orientation][!orientation][amenity=parking] {
     2469  throwWarning: tr("{0} is deprecated", "{0.tag}");
     2470  group: tr("deprecated tagging");
     2471  suggestAlternative: "{1.key}={0.value}";
     2472  fixChangeKey: "{0.key} => {1.key}";
     2473}
     2474area[parking:orientation][orientation]["parking:orientation"=*orientation][amenity=parking] {
     2475  throwWarning: tr("{0} is deprecated", "{0.tag}");
     2476  group: tr("deprecated tagging");
     2477  fixRemove: "{0.key}";
     2478}
     2479area[parking:orientation][orientation]["parking:orientation"!=*orientation][amenity=parking] {
     2480  throwWarning: tr("{0} is deprecated", "{0.tag}");
     2481  group: tr("deprecated tagging");
     2482  suggestAlternative: "{1.key}={0.value}";
     2483  suggestAlternative: "{1.key}={1.value}";
     2484}
     2485
    24672486/* When tags are deprecated they should be added to ignoretags.cfg too. */
  • resources/data/validator/ignoretags.cfg

    diff --git a/resources/data/validator/ignoretags.cfg b/resources/data/validator/ignoretags.cfg
    index df2adfeba..b6cc31bd0 100644
    a b E:toilet  
    740740K:type=turnlanes:turns
    741741K:surface=paving_stones:30
    742742E:site_type
     743E:parking:orientation
    743744;
    744745; Tags not yet decided (to remove from this section when added or moved up when deprecated)
    745746; see josm tickets: 17770 15309 15774 16315 16658 16793 19982 21396