osmose-backend
osmose-backend copied to clipboard
Implement drive-through check (attempt 2)
New attempt based on feedback in #1521 (new PR as it's mostly a rewrite; keeps things clean :) ) Fixes #1499 - Check for potential driveway/drive-through mix-ups.
- Start from
highway=service
+service=drive-through
(and not a oneway, which is just a shortcut as oneways are theoretically never dead-ended) - Get the end nodes of this way
- Filter out (via
LEFT JOIN
+WHERE ... IS NULL
) the end nodes that are connected to any other way - Filter out (the last
JOIN
) i.e. turning circles (which could make it a valid dead-end drivethrough) and entrances (if e.g. the indoor part isn't mapped)
Results of some countries attached; no false positives so far; several "bad" drive-throughs found. (Note: in my local tests I disabled the class=1&2&3 analysers, hence their results are not listed)