OpenHistoricalMap/Tags/Relation/multilinestring

From OpenStreetMap Wiki
Jump to navigation Jump to search
multilinestring
Description
A discontiguous series of unclosed ways that semantically represents a single physical object. Show/edit corresponding data item.
Group: properties
Members
  • way (empty)
Status: in usePage for proposal

A relation tagged type=multilinestring is a discontiguous series of unclosed ways that semantically represents a single physical object.

Beyond the niche uses in OpenStreetMap, some OpenHistoricalMap contributors use multilinestring relations to represent a linear highway=* feature as it evolves over time, particularly as its highway classification changes. Compared to mapping multiple overlapping ways, this method has the advantage of populating the relation list in JOSM, making it easier to navigate among the stages in the physical roadway's evolution. However, it has the disadvantage of requiring more elements overall. This additional complexity leads to poor software support and frequent modeling errors.

How to map

Remove all the tags from the ways. Add the ways to a multilinestring relation that has the same tags that were on the ways.

Examples

Let's consider a road that is modeled using the basic method of stacking multiple overlapping ways:

1800–1900 Way 1
highway=primary
1900–2000 Way 1′
highway=secondary

You can factor out the stack into multilinestring relations:

Way 1
(member of 2)
1800–1900 Multilinestring 1
(1 member)
highway=primary
1900–2000 Multilinestring 1′
(1 member)
highway=secondary

Since a multilinestring relation's attributes must be consistent from end to end, it is limited by any change that occurs along the feature. For example, if a road traverses a bridge, you would ordinarily split the roadway at the bridge's endpoints in order to add bridge=yes to the bridge segment. You would do this for each roadway in the stack:

1800–1900 Way 1
highway=primary
Way 2
highway=primary
bridge=yes
Way 3
highway=primary
1900–2000 Way 1′
highway=secondary
Way 2′
highway=secondary
bridge=yes
Way 3′
highway=secondary

As an alternative, you can maintain just one set of ways but overload it with multiple sets of multilinestring relations:

Way 1
(member of 2)
Way 2
(member of 2)
Way 3
(member of 2)
1800–1900 Multilinestring 1
(1 member)
highway=primary
Multilinestring 2
(1 member)
highway=primary
bridge=yes
Multilinestring 3
(1 member)
highway=primary
1900–2000 Multilinestring 1′
(1 member)
highway=secondary
Multilinestring 2′
(1 member)
highway=secondary
bridge=yes
Multilinestring 3′
(1 member)
highway=secondary

If the road is a member of a designated route, the route needs to be modeled as a route relation. Route relations can efficiently group stacked ways as long as they exist in different time periods:

1800–1900 Way 1
(member of 2)
highway=primary
Way 2
(member of 2)
highway=primary
bridge=yes
Way 3
(member of 2)
highway=primary
1900–2000 Way 1′
(member of 2)
highway=secondary
Way 2′
(member of 2)
highway=secondary
bridge=yes
Way 3′
(member of 2)
highway=secondary
1900–1950 Route 1
(6 members)
ref=A
1950–2000 Route 1′
(6 members)
ref=B

When using multilinestrings, the multilinestrings need to exist parallel to the route relations. Do not make the multilinestring relations members of the route relations:

Way 1
(member of 4)
Way 2
(member of 4)
Way 3
(member of 4)
1800–1900 Multilinestring 1
(1 member)
highway=primary
Multilinestring 2
(1 member)
highway=primary
bridge=yes
Multilinestring 3
(1 member)
highway=primary
1900–2000 Multilinestring 1′
(1 member)
highway=secondary
Multilinestring 2′
(1 member)
highway=secondary
bridge=yes
Multilinestring 3′
(1 member)
highway=secondary
1900–1950 Route 1
(3 members)
ref=A
1950–2000 Route 1′
(3 members)
ref=B

Software support

OpenHistoricalMap vector tiles render multilinestrings that have certain tags like highway=*.

Nominatim does not index multilinestrings, so turning a roadway into a multilinestring makes it unsearchable. Future routers are unlikely to support routing over a multilinestring. No editor or validator supports multilinestrings.

Alternatives

For linear features like roadways and railways, the alternative is to stack multiple ways that have similar attributes. To minimize the size of the stack, use other types of relations can group the feature's constituent elements by certain attributes, independently of the physical infrastructure: