gravitystorm/openstreetmap-carto — pull request #441 by math1985 (2014-03-28 03:00:43+00:00)
Title: Clean up widths of bridges and tunnels

There is currently not much logic behind the width of bridges and
tunnels. This commit gives bridges and tunnels consistent widths.

Changing the widths of regular roads, i.e. roads that are not in a
tunnel or on a bridge, is out of the scope of this commit, and will be
dealt with later. Highways other than motorway, trunk, primary,
secondary, tertiary, residential/unclassified and their links are also
out of scope.

The width of bridges and tunnels after this commit is either inherited
from, or defined in terms of the width of regular roads. This will make
the widths of tunnels and bridges easier to maintain.

The widths have been changed based on the following three principles.

1. Make the casing of bridges just as wide as the casing of regular
roads.
> Currently, the casing of bridges is a mess. Some bridges are
narrower than regular roads, up to 1.8 pixel (trunk and primary
roads on z15/z16). On the other hand, motorway links are 1.5 pixel
wider on bridges on z12. There are also all kinds of cases in
between.
When the casing of bridges is narrower than the casing of regular
roads, itwith too much of the background, especially when two roads
run closely in parallel. Therefore, I have chosen to make the casing
of bridges and regular roads equal.

2. Make the diffence between bridgecasing and bridgefill, i.e. the black
outline of bridges, per zoomlevel the same for all road types.
> Currently the black outline of bridges (casing minus fill) is
thicker for some roads (z13: tertiary roads; z14: tertiary roads
and tertiary link roads; z17: motorway roads, motorway links,
residential/unclassified roads) compared to other roads on the same
zomolevel. This is because they have a bit smaller bridgefill, and
thus a larger black outline, compared to the other roads.
The black outline (casing minus fill) should be a bit narrower than
the regular outline, because the black stands out much more out
than the regular casing which blends in with the fill of the road.
As we keep bridges and regular roads the same width, consequently
the fill on bridges needs to be a bit wider than the fill on
regular roads.

3. Keep the casing and fill of tunnels the same as the casing and fill
of regular roads.
> Again there are currently large and inconsistent differences. Trunk
and primary on z17 and larger are even 4 pixels narrower in tunnels.
On the other hand, tertiary on z17 and larger are 0.5 pixel wider
in tunnels. I see no reason to give tunnels a different width.
Therefore, I have made tunnels equally wide as regular roads.

As the new definitions keep the casing constant, rather than the fill,
the most basic definition is now the width of the casing of roads,
instead the width of the fill. All other widths are now derived from
that.

This commit solves 3834 on trac and part of #265 on Github.