Opened 9 years ago

Closed 9 years ago

#3528 closed enhancement (fixed)

Grouping map features that share a top-level tag

Reported by: stevage Owned by: potlatch-dev@…
Priority: minor Milestone:
Component: potlatch2 Version:
Keywords: Cc:


It's not currently possible to define a map feature covering multiple top-level tags, like railway=spur and railway=rail. As a result, we get a few too many entries in the feature list, when they would be better specified as sub-options.

Change History (2)

comment:1 Changed 9 years ago by stevage

Actually, it is possible, it's just buggy: this matches ok:

<tag k="traffic_calming" v="*"/>

It just stores the * literally as the value if nothing else is chosen.

Suggested enhancement:

  • don't store literal *'s
  • have a way of specifying more complex matches, perhaps <tag k="railway" v="rail" match="rail|preserved|disused">

comment:2 Changed 9 years ago by stevage

Resolution: fixed
Status: newclosed

I have implemented this in 25255, and welcome discussion on its merits. The final syntax/semantics I went with:

<tag k="traffic_calming" v="yes" vmatch="*" />

Means that any traffic_calming=* will be recognised, and the default value (unless set explicitly by the included dropdown) will be "yes"

If vmatch is not "*", it is interpreted as a regular expression, so this works:

<tag k="highway" v="motorway" vmatch="motorway(_link)?" />

or, more simply: <tag k="highway" v="motorway" vmatch="motorway|motorway_link" />

I think this is a useful extension, to solve a few peculiarities in the tagging scheme and to give us a bit of flexibility in decoupling the interface from the underlying tags. (With appropriate caution exercised...)

It doesn't quite solve the highway=proposed, proposed=..., but it's a step closer.

The same mechanism could also be used for <choice> elements of drop downs:

<choice value="muslim" vmatch="muslim|islamic" ...>

(Again, with appropriate caution...)

Note: See TracTickets for help on using tickets.