Open valhentai opened 9 years ago
That would prevent such funny tagging (multiple bollard nodes): This is probably a correct tagging.
http://www.openstreetmap.org/?mlat=50.77814&mlon=6.06655#map=19/50.77814/6.06655
fr style renders specially only barrier=bollard (see https://github.com/cquest/osmfr-cartocss/blob/master/other.mss#L3626)
Is there also other discontinuous barrier type that may be worth supporting?
barrier=block would make sense IMO, is not defined on ways in wiki but has 2300 in the DB.
barrier=spikes perhaps. has only 6 instances in the DB.
2015-10-11 20:32 GMT+02:00 Holger Jeromin notifications@github.com:
That would prevent such funny tagging (multiple bollard nodes):
http://www.openstreetmap.org/?mlat=50.77814&mlon=6.06655#map=19/50.77814/6.06655
why is that "funny"? in the meantime someone has deleted these bollards. Given that they are there, I'd consider this vandalism. It is one thing to render bollard lines in some way, and it is another to have the actual positions of multiple bollards (i.e. more information). Bollards are mostly interesting for routing, but not only, each of them is a feature as well.
AFAIK this style already renders bollard lines as dots along the line, but I'd encourage people to map actual bollards, not sets of them (in many cases, according to the situation).
in the meantime someone has deleted these bollards. Given that they are there, I'd consider this vandalism.
It is better to discuss it at http://www.openstreetmap.org/changeset/34743220#map=19/50.77841/6.06722 which seems to be a relevant changeset.
I deleted the four nodes and merged the middle bollard to the highway (so it is usable in the routers and not only nice on a rendering).
But you are probably right. If they are there, they should stay. I just restored them.
sent from a phone
Am 21.10.2015 um 11:03 schrieb Holger Jeromin notifications@github.com:
I just restored them.
thank you. Yes, on bollard should be part of the highway to make it usable.
AFAIK this style already renders bollard lines as dots along the line
No, it does not: http://www.openstreetmap.org/way/326841609
Am 21.10.2015 um 11:26 schrieb Holger Jeromin notifications@github.com:
AFAIK this style already renders bollard lines as dots along the line
No, it does not: http://www.openstreetmap.org/way/326841609
maybe a regression, I believe to recall it once did...
barrier=kerb can also have a different rendering. Currently it has the same rendering as barrier=wall so there is no difference between a kerb and a wall on the map.
It could be rendered as a dashed line. Here is a example of the french cadastre were the dashed lines are kerbs.
"barrier=kerb can also have a different rendering"
I was thinking about something similar to that myself. You should open a new issue for it.
I looked into the options for rendering barrier=bollard when mapped as a line.
The wiki page for barrier=bollard and the key page for barrier both mention that lines of bollards can be mapped with a way. There are 11,232 ways mapped.
I downloaded all of the ways tagged with barrier=bollard
in England. There are 727 linear ways and only 4 closed ways, so it appears that most of the ways are mapped appropriately. In England there appear to be 2 main types of bollards mapped with a way:
1) short lines of bollards across a single road. This is often also mapped with barrier=bollard on a node shared with the highway way.
2) Longer lines of bollards parallel to a road, usually preventing vehicles from entering a sidewalk or pedestrian area. These would be a pain to map one node at a time.
There are also some bollards mapped around an object (such as a tree or statue in a traffic circle), and sometimes there are lines of bollards across a pedestrian square, park or parking lot, not by a highway.
Both 1) and 2) have difficulties with rendering at lower zoom levels, because line barriers render below the highway. If the line of bollards across a road is short, it will not be visible at z17 and below. If a line of bollards parallel to a road is too close to the road, it will overlap with the road rendering at z17. For this reason, I'd suggest only rendering bollards mapped as ways on z18 and higher.
(The French style shows them from z17, but I don't think they are as concerned with the rendering near the equator. )
Early test renderings (with lines) at z17: vs z18:
z17 - only the bollard mapped as a node is shown (it renders above the highway): compare z19:
There are two ways to render this. My few tests (as in the first 2 images above) used line renderings, with the line-width
set to 3 or 4 pixels (based on zoom level) and line-dasharray: 0.1,8
, with line-cap: round
- it turns out the French style does the same thing to produce nearly-circular dots, spaced 8 pixels apart.
This looks very similar to the bollard rendering on nodes (which uses a 3 or 4 pixel width circular marker), but does not block the display of other markers. However, this means that sometimes the dots merge together where 2 lines meet, eg:
z19 - traffic circle in Germany with a line of bollards around a central tree z18 lines
The alternative is to use a circular marker-symbol
, identical to that used for bollards mapped as points, and have it spaced 8 pixels apart along the line, with marker-placement: line
and marker-spacing: 8
. This prevents the dots from touching or overlapping at intersections of lines, or overlapping with other symbols:
z19 markers
z18 markers
However, since the markers are placed based on the center of the line, rather than starting at one end like a line features, the markers are more likely to be covered by the highway when going across, especially at z18:
z18 marker-placement: line
It's also possible to have a marker placed on the first and last point of the line, with marker-placement: vertex-first
and marker-placement: vertex-last
- using 2 additional attachments in the same layer. Then the rest of the line can be rendered with marker-placement: line
to fill in the points between.
But then the dots are not evenly spaced, which doesn't look great:
z19 marker-placement: vertex-first
& marker-placement: vertex-last
z19 marker-placement: vertex
-last
and line
To get a perfect rendering I suppose we would need to generate a set of nodes from the line geometry, adjusting the spacing to be even, but that's probably too complicated for this style (and for my SQL abilities)
Any comments on if the line rendering with line-dasharray or the marker rendering is superior performance-wise?
Also, unless marker-ignore-placement: true
is used, the bollard dots will prevent other icons from rendering, for example a gate:
With marker-ignore-placement: true
it still renders:
Quick general comment: You should try to avoid confusion between line signatures (however they are produced technically) and individual mapped geometries.
A similar problem was already discussed in #1753.
try to avoid confusion between line signatures (however they are produced technically) and individual mapped geometries.
I'd been thinking about this. Initially I tried significantly increasing the spacing between dots between zoom levels, but this could suggest they represent nodes. By using similar pixel spacing between the dots at z18 and z19 the position of the dots changes in relation to the other mapped features between zoom levels, so this helps to show that it is an abstract pattern.
I think long lines of bollards will not be confused with individually mapped nodes, because of this.
The issue is mainly with very short lines, which are often used crossing a road, where only a few dots will be visible, and perhaps only at z19.
We could select the length of the way and use this to adjust the rendering: short lines (less than 16 pixesl long) could have nodes only rendered on their first and last node, while longer ways would be rendered with marker-placement: line
. The first and last node of the way should be co-incident with a bollard (otherwise it's a non-verifiable geometry).
But that might be too much code complexity for a minor problem.
I've tried opening an issue at Mapnik, requesting a way to evenly space markers between vertices of a line: https://github.com/mapnik/mapnik/issues/4082
However, we could try one of the two options above for now: https://github.com/gravitystorm/openstreetmap-carto/issues/1908#issuecomment-482495411
Rendering way of bollard's still not supported right? https://www.openstreetmap.org/way/1170465069
In the French rendering of OSM (http://tile.openstreetmap.fr/), discontinious barrier such as bollard are rendered as dots instead of a line. It allow user to make a difference between unpassable barrier like a wall and barrier which allow pedestrians and bike to pass like bollard.