gravitystorm / openstreetmap-carto

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

Render embankment=yes in addition to man_made=embankment #791

Open matthijsmelissen opened 10 years ago

matthijsmelissen commented 10 years ago

The following issue has been moved over from trac:

Mapnik renders embankments only when tagged as man_made=embankment, but Map Features page say embankment=yes should be used. man_made=embankment is not documented anywhere on wiki except natural=cliff.

I suggest to change rendering rules to render embankment=yes (and maybe remove man_made=embankment).

matkoniecz commented 10 years ago

This is outdated, see http://wiki.openstreetmap.org/wiki/Tag:man_made%3Dembankment

matkoniecz commented 10 years ago

see also https://josm.openstreetmap.de/ticket/10313 - it would be a good idea to keep wiki, JOSM and default style synchronised

AndiG88 commented 10 years ago

This is outdated

While it is now documented, embankment=yes is still used 8x more. Although supporting man_made=embankment would be easier as the man_made Key is already in the DB.

matthijsmelissen commented 10 years ago

the man_made Key is already in the DB.

So is the embankment key.

AndiG88 commented 10 years ago

So is the embankment key.

I meant the one carto uses. Or tables. (Not a programmer^^) At least with public_transport I was always told the issue was we were using buy=yes so I guess it's the same problem here.

matthijsmelissen commented 10 years ago

No, for some reason the embankment key is there even though we don't currently use it.

Here you can find the list of keys we have in the database: https://github.com/gravitystorm/openstreetmap-carto/blob/master/openstreetmap-carto.style

sb12 commented 10 years ago

Note that embankment=yes and man_made=embankment are used differently: embankment=yes says that a highway or railway is on an embankment and is used similar to bridge=yes and tunnel=yes man_made=embankment is for mapping exact dimensions of an embankment and is used similar to natural=cliff

dieterdreist commented 10 years ago

Il giorno 30/lug/2014, alle ore 17:26, sb12 notifications@github.com ha scritto:

Note that embankment=yes and man_made=embankment are used differently:

+1, the former is an attribute, the latter a feature

Rovastar commented 10 years ago

But I presume they are to be rendered the same?

sb12 commented 10 years ago

No, I think they need to be rendered differently:

embankment=yes and highway=tertiary tertiary_embankment

(Both sides of the embankment are shown)

man_made=embankment: manmade_embankment

(Only one side of the embankment is shown)

daganzdaanda commented 10 years ago

I agree with @sb12 about the rendering. Would it be possible to render embankment=yes also when the feature is not rendered? Thinking of railway=abandoned or dismantled...

We should also think about cutting=yes. It could be the same just with the triangles pointing inwards.

matkoniecz commented 10 years ago

Is it possible to have properly looking map and render both man_made=embankment and embankment=yes? In case that it is not possible I think that more detailed tagging (man_made=embankment) should be encouraged.

matthijsmelissen commented 10 years ago

It seems the only way to render embankment=yes as an attribute of roads correctly is to set up similar code as for bridges, i.e. let the separating distance of the embankment lines depend on the size of the bridges. However, that will lead to a lot of extra code for a relatively minor gain. Ideas?

daganzdaanda commented 10 years ago

let the separating distance of the embankment lines depend on the size of the bridges.

How about a fixed distance (widest road width)? Narrower roads would have a bit of space, but that's really no problem, IMHO.

Zecke64 commented 10 years ago

I agree it would make sense to have embankment as an attribute. Anyway it will be necessary to be able to specify whether it is on both sides or only on one side. So, embankment=yes/left/right would do the trick (yes means on both sides).

dieterdreist commented 10 years ago

both should be rendered, embankments are features on their own (man_made) but can also be attributes to other features like highways and railways

Zecke64 commented 10 years ago

Yes and if they're attributes to other features they can have three flavours: left side, right side and both sides.

pnorman commented 10 years ago

embankment=* usage is 68k yes, 4.7k no, 362 left, 142 right.

If it's significantly harder to render one-sided embankments, we might have to only do yes initially.

My initial thought is that it should be under the road layers, but above water and landuse. Perhaps stick it adjacent to the cliff/embankment layer?

Zecke64 commented 10 years ago

Is it really harder? Should'nt it be the same quality as natural=cliff or man_made=embankment, both having one-sided slopes?

pnorman commented 10 years ago

I was thinking of using a technique similar to one-way arrows with a set of dasharray, which wouldn't work for only one side easily. I'm not sure how the cliff technique of a line-pattern-file would work with an image with significant height for the transparent area, or if it could be offset.

matkoniecz commented 9 years ago

Is there any way to render it sensibly with multiple objects on one embankment? For example several railway=rail with embankment=yes? man_made=embankment works fine in that situation, I see no way to render embankment=yes properly.

a01020304uk commented 7 years ago

any update to this as really need to show embankments on a map

dieterdreist commented 7 years ago

sent from a phone

On 21. Jun 2017, at 01:36, a01020304uk notifications@github.com wrote:

i dont know how you add things for rendering but this would be good for railway embankment https://cloud.githubusercontent.com/assets/5783139/3751994/c0fa3b58-1803-11e4-87a6-f4cfd38de3fe.png

looks like retaining walls, I'd use lighter and more dense (3 times) lines for embankment (slope)

polarbearing commented 7 years ago

Could somebody change the title, removing the 'instead'? We apparently need both, feature and attribute.

imagico commented 7 years ago

@a01020304uk - this requires someone to develop a good solution for this - which is not trivial to implement in a way that works reasonably well is all the different cases like junctions, curves etc.

matkoniecz commented 7 years ago

I am considering closing it, as I consider unfeasible to reliably avoid without very complicated code, duplicate rendering caused by

pnorman commented 6 years ago

Closed for reasons listed above and no one showing a way to do it without very complicated code.

SomeoneElseOSM commented 6 years ago

If anyone still fancies having a go, here's how I did it in a different OSM Carto-based style:

1) Split the features we're interested into "standalone" embankments and "others" in lua.

2) Render "standalone" ones as regular features (2-sided cliffs, actually) and the others as modifiers to the main feature (highway, railway, etc.) in the same way that "bridge" is.

The result looks like this. I'm not convinced that the "visual weight" of the modifier is correct for all features yet, but you can get the idea.

imagico commented 6 years ago

Indeed a bridge like depiction of embankments on roads and railways seems feasible. What i had been contemplating is if there is a way to distinguish between cutting and embankment in an intuitive way using that approach.

jeisenbe commented 5 years ago

This issue was closed due to problems with:

  1. rendering embankment=yes on linear feature and man_made=embankment tagged separately
  2. rendering multiple embankment=yes from linear features on a single embankment (for example railway tracks)
  1. Could be considered not the best mapping practice: should both features be tagged at the same time?

But if this happens and we are going to support one way of tagging, adding embankment=yes to the highway/railroad/waterway allows correct rendering at all zoom levels and is easier for mappers than micro-mapping the lines of the embankments separately.

Right now this style is encouraging mappers to not add cutting=yes or embankment=yes to linear features, since this is not rendered, which suggests that this way of mapping is not correct, when in fact it's a good way of representing these features.

  1. can be solved by rendering embankments in a similar style to bridges, I believe.

I'd be interested in reopening this. There are 2 examples of how the rendering could be done (with simple or more complex code) at http://blog.imagico.de/rendering-implicit-embankments/

imagico commented 4 years ago

Reopening because there have been several ideas demonstrated (in AJT-style and ac-style) how this can be done. There does not appear to be consensus not to render embankment/cutting=yes and given the popularity among mappers rendering man_made=embankment but not embankment/cutting=yes appears to be a serious issue w.r.t. the goals of this style (providing constructive mapper feedback).

jeisenbe commented 4 years ago

Re: AJT-style, is that referring to https://github.com/SomeoneElseOSM/openstreetmap-carto-AJT perhaps?

imagico commented 4 years ago

Yes.

ppete2 commented 1 year ago

I think it would be a good idea to render embankment/cutting=yes cause both tags are well documented https://wiki.openstreetmap.org/wiki/Key:embankment and also often used. I also like the rendering examples demonstrated in http://blog.imagico.de/rendering-implicit-embankments/