gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.54k stars 822 forks source link

Minimum number of oneway arrows #595

Open matthijsmelissen opened 10 years ago

matthijsmelissen commented 10 years ago

The following issue has been moved over from trac. It needs more discussion as it is not clear how this should be implemented.

Please make sure there is a minimum number of oneway arrows visible (on high zoom levels).

E.g. here on the oneway street "Vom-Rath-Straße" there is only one arrow at the north end that can be overlooked easily. In high zoom levels (17,18) there is enough space for a(n) additional arrows(s) e.g. at the south end. Alternatively you may consider drawing a more transparent arrow under the street name - but only if there is not enough space for the previous solution.

matthijsmelissen commented 10 years ago

I'm actually not sure why no southern arrow renders on z18?

matkoniecz commented 10 years ago

other examples: http://www.openstreetmap.org/?mlat=50.0629&mlon=19.9353#map=16/50.0629/19.9353 http://www.openstreetmap.org/?mlat=50.0624&mlon=19.9417#map=16/50.0624/19.9417 http://www.openstreetmap.org/?mlat=50.0627&mlon=19.9404#map=16/50.0627/19.9404 http://www.openstreetmap.org/?mlat=50.0582&mlon=19.9390#map=16/50.0582/19.9390

mrwojo commented 10 years ago

I'm actually not sure why no southern arrow renders on z18?

A few blue pixels are visible under the "Vom" (mostly hidden by the text's halo), which is about 160px from the other arrow. Note also that the road is oneway=-1 (the beginning of the way, where the first arrow is placed, is at the north end).

matthijsmelissen commented 9 years ago

Reopening (false closed by commit message).

matthijsmelissen commented 9 years ago

Unless @matkoniecz can perhaps confirm this is indeed solved?

matkoniecz commented 9 years ago

According to my tests it is not solved.

nebulon42 commented 9 years ago

Sorry, did not know that Github could misinterpret the "might fix ...".

matkoniecz commented 9 years ago

Github probably detected "fix ..." and ignored "might".

jeisenbe commented 5 years ago

In #3890 @dieterdreist again notes that short roads do not get oneway arrows placed.

This is because since #1840 in September 2015 they are rendered from svg icons with:

        marker-placement: line;
        marker-spacing: 180;

The arrows for paths are rendered as a text symbol, but with the same line placement and spacing.

This means that if the total length of the line is less than 90 pixels (half the spacing), no arrow will be placed. If marker-spacing is reduced, arrows would be placed on shorter ways, but also there would be more of them.

In the past, before #1840, oneway arrows were rendered as a raster line pattern, and we had the issue of them appearing too soon, near the beginning of a way. See #284

It might be possible to remove the marker-spacing for ways that are shorter than 100 pixels, but longer than 20 or so, and place just one arrow at the center of the way.

Any ideas on how to achieve that technically? Is the length of way recorded already, similar to way_area?