Hi Kate!

I'm curious what the match tag does in JOSM presets.

For a selected OSM object, JOSM determines relevant presets, which are displayed together with the object's tags in the properties dialog on the right. For instance, an object with building=yes is assigned the preset "Man Made/Building".

The match attribute in the XML file allows to control whether an object is considered to match a preset.

Typically, <combo> elements are optional attributes for an object (e.g., surface=) and therefore are not taken into account when matching an object (match="none"). However, for the preset "Building", some values for building= are predefined in a <combo> element. Whenever building=yes is present, the "Building" should be displayed (match="keyvalue"). Similarly for the "Bridge" preset.
These are a few examples where a match attribute is used on <combo>'s.

The same need for distinction arises from <text> elements when you think of name= as optional information for some amenities on the one side, and of addr:street= as a defining tag for the "Address Information" preset (match="key").

I hope, the usage of match did become clearer now. If not, feel free to ask. :-)

Cheers,
Simon (the "inventor" of this attribute *g*)

_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to