Modify

Opened 17 months ago

Last modified 17 months ago

#23865 new enhancement

Problem with the regions validator (false positive) if there are duplicate presets (like one for inside the US and Canada and one for outside the US and Canada)

Reported by: goodidea Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: vespucci regions tagging preset Cc: SimonPoole, stoecker

Description

Kopiert von 23290#comment:53:

Is it sure that the validator will work correctly if regions is used in an item tag?

For example, I now always get the validator warning “Preset is invalid in this region – Preset Charging Station should not be applied in this region”., when I edit a charging station in Germany. And this is caused by a preset with regions="US,CA" in the item tag (I checked this by changing the name of the preset). The preset is from Simonpoole's “beautified-JOSM-preset” (see https://github.com/simonpoole/beautified-JOSM-preset).

Note: there is a second “Charging Station” preset for all other regions with exclude_regions="true" regions="US,CA" in the item tag. This does not cause validator warnings for objects in Germany.

Here is the code of these 2 presets:

            <item name="Charging Station" icon="transport_charging_station.png" regions="US,CA" type="node,closedway,multipolygon" preset_name_label="true">
                <link wiki="Tag:amenity=charging_station"/>
                <space/>
                <key key="amenity" value="charging_station"/>
                <reference ref="charging_base"/>
                <space/>
                <reference ref="charging_sockets_cables_us_ca"/>
                <preset_link preset_name="Charge point" text="Similar but different tags:"/>
            </item> <!-- Charging Station US,CA -->

           <item name="Charging Station" icon="transport_charging_station.png" exclude_regions="true" regions="US,CA" type="node,closedway,multipolygon" preset_name_label="true">  
                <link wiki="Tag:amenity=charging_station"/>
                <space/>
                <key key="amenity" value="charging_station"/>      
                <reference ref="charging_base"/>
                <space/>
                <reference ref="charging_sockets_cables"/>
                <preset_link preset_name="Charge point" text="Similar but different tags:"/>   
            </item> <!-- Charging Station -->

Attachments (0)

Change History (1)

comment:1 by taylor.smock, 17 months ago

Component: CoreCore validator
Milestone: 24.08

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to goodidea.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.