[Talk-us] Rewriting route direction documentation to emphasize subrelations
Minh Nguyen
minh at nguyen.cincinnati.oh.us
Mon Aug 2 00:34:50 UTC 2021
Vào lúc 15:47 2021-08-01, Paul Johnson đã viết:
> On Sat, Jul 31, 2021 at 2:48 PM Tod Fitch <tod at fitchfamily.org> wrote:
>>
>> I don’t have a good feeling about how the whole country is, but all the freeways I have looked at in California have three relations (1 master and one each for the cardinal direction). In my area the US routes are mostly but not all using three relation scheme as are a few California state routes. At least for my editing style using JOSM, I much prefer the super/sub relation scheme as I find it easier to fix things when broken.
>
> I can say this is also largely the case in Oklahoma, though for routes
> with only one relation, then it's because splitting it is gross
> overkill because the end of the route is on a single carriageway on
> both ends and is thus extremely easy to validate with pretty much
> everything except id anyway.
From a mapper's standpoint, especially as a committed iD user, I can
understand why multiple relations seem like overkill. I was an early
advocate for cardinal direction roles back in the Potlatch 1 days, when
working with relations was even more painful. Even today, it would be
unreasonable to expect the average mapper to set up multiple
long-distance relations just because a city landscaped a median for half
a block.
From a data consumer standpoint, I think the _eventual_ goal should be
unidirectional route relations anywhere cardinal directions are posted.
Both formats are workable and routers already recognize either when
generating guidance instructions. But mappers are only bothering with
cardinal direction roles as replacements for forward/backward, not for
anything else. So if you're turning left at an arbitrary intersection
onto a two-way street along a U.S. Route, you're unlikely to hear "U.S.
### North", even if that's what the sign says.
Since 2013, the documentation for cardinal directions has supposed that
the two-way street would have a role of "north" corresponding only to
the forward direction, and a data consumer would infer "south" for the
backward direction. [1] In fact, OSRM and Valhalla -- the only consumers
of this data that I'm aware of -- never infer the opposite direction, so
they would announce "North" going in either direction. [2][3] Maybe
MapQuest Open was different, but it's long gone. [4] Fortunately, it
doesn't seem like mappers expect the same inference that the wiki did.
It's also been suggested that, in the absence of any cardinal direction
tagging, routers should infer the route's direction based on its overall
geometry. This is unrealistic given how route relations are modeled and
processed, and I don't think it would be reliable anyways. For example,
U.S. 42 is signposted as an east-west route in Kentucky and a
north-south route in Ohio. Apparently Ohio is correct, but just barely:
the 350-mile-long route travels 4¼ miles more northerly than easterly.
Anyways, lots of things in OSM are eventual goals. Getting routers to
announce cardinal directions on two-way segments isn't so important that
folks would need to put everything down and fiddle with superrelations.
[1]
https://wiki.openstreetmap.org/wiki/Special:PermanentLink/967503#Posted_Directionality_of_2-way_Single_Carriageway_Ways
[2]
https://github.com/Project-OSRM/osrm-backend/blob/41dda32546399f1dc12af1de41668993de44c7dc/profiles/lib/relations.lua#L130-L140
[3]
https://github.com/valhalla/valhalla/blob/8e0261c533d56f91df3c9f5fdac9a78e6b23c741/src/mjolnir/osmdata.cc#L583
[4]
https://lists.openstreetmap.org/pipermail/talk-us/2013-November/012186.html
--
minh at nguyen.cincinnati.oh.us
More information about the Talk-us
mailing list