tile-generator: also emit oneway roads
This commit is contained in:
parent
e3ec5ce1f9
commit
67b6341f68
|
@ -24,10 +24,10 @@ RETURNS TABLE(
|
||||||
r.dir as direction,
|
r.dir as direction,
|
||||||
case when road.directionality = 0 then r.dir else 0 end as offset_direction
|
case when road.directionality = 0 then r.dir else 0 end as offset_direction
|
||||||
FROM road
|
FROM road
|
||||||
FULL OUTER JOIN (VALUES (1, TRUE), (-1, FALSE)) AS r(dir, rev) ON (road.directionality = 0 or road.directionality = r.dir)
|
LEFT JOIN (VALUES (1, TRUE), (-1, FALSE), (0, FALSE)) AS r(dir, rev) ON (abs(r.dir) != road.directionality)
|
||||||
FULL OUTER JOIN overtaking_event ON (road.way_id = overtaking_event.way_id and overtaking_event.direction_reversed = r.rev)
|
FULL OUTER JOIN overtaking_event ON (road.way_id = overtaking_event.way_id and (road.directionality != 0 or overtaking_event.direction_reversed = r.rev))
|
||||||
-- WHERE road.name = 'Schlierbergstraße'
|
-- WHERE road.name = 'Merzhauser Straße'
|
||||||
WHERE road.geometry && bbox
|
WHERE road.geometry && bbox
|
||||||
GROUP BY road.way_id, road.geometry, road.directionality, direction;
|
GROUP BY road.name, road.way_id, road.geometry, road.directionality, r.dir;
|
||||||
|
|
||||||
$$ LANGUAGE SQL IMMUTABLE;
|
$$ LANGUAGE SQL IMMUTABLE;
|
||||||
|
|
Loading…
Reference in a new issue