Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building z-order broken? #1130

Closed
kvlahromei opened this issue Nov 14, 2014 · 16 comments
Closed

Building z-order broken? #1130

kvlahromei opened this issue Nov 14, 2014 · 16 comments

Comments

@kvlahromei
Copy link

Hi there,

I guess we've got a bug when we have buildings that contain other ways:
hro hbf osm rails bug
http://www.openstreetmap.org/#map=18/54.07835/12.13105&layers=N
As you see, the rails are above the buildings, even if they are in a tunnel and subways. Also the footways seem to be above the buildings while they are just within. IMHO the vizualisation was different / correctsome time ago :-/

@HolgerJeromin
Copy link
Contributor

very similar to #688.

@matthijsmelissen
Copy link
Collaborator

Yes, it's duplicate. It's something that definitely needs to be looked at, but it's hard to get layering right in all circumstances.

@kvlahromei
Copy link
Author

NP, sadly wasn't able to find the other issue. Please mark as dupe :)

@mboeringa
Copy link

but it's hard to get layering right in all circumstances.

+1

Besides the inherent difficulties of the "3D" aspect rendered in 2D, I think people should be more aware of the great effort it already requires to make any sort of "logically" feeling rendering when it comes to layering different thematic layers of data.

There is no good or bad, or correct or wrong, when we consider the translation of concrete objects in the real world, to a digital rendered map. _Everything_ is interpretation / choice by the style developer.

Looking at this particular example, personally, I also see good reasons to keep rendering railway station buildings below tracks:

  • It allows you to view the inner layout of tracks and platforms of sometimes rather complex transportation hubs. Platform, and platform labels, can help people find their way inside the station complex.
  • By rendering the tracks on top of railway station buildings, the continuity aspect of the tracks is emphasized, and there can be no doubt whether a train station is a true "drive-through" station, or a terminus.

If the "roofed-over" aspect of some tracks needs to be visible, I think it would be better if Carto started support for rendering of the "building=roof" tag (for open sided roofs, like on many railway stations), or change the way it is currently rendered (I am not sure if it is, it doesn't seem so?). The images below, from my ArcGIS renderer, show some of the nice rendering that can be achieved by open hatches on this tag, in combination with railway stations:

rotterdam_railway_station

roma_termini_railway_station

@dieterdreist
Copy link

2014-11-14 10:24 GMT+01:00 Matthias Meißer notifications@github.com:

http://www.openstreetmap.org/#map=18/54.07835/12.13105&layers=N
As you see, the rails are above the buildings, even if they are in a
tunnel and subways. Also the footways seem to be above the buildings while
they are just within. IMHO the vizualisation was different / correctsome
time ago :-/

agree for the footway. The subway is inconsistent as it is not rendered
over the station building or roads or the square, but over the other
buildings.

IMHO (and usually) a dashed line is used to denote a feature that is behind
the visible plane. In this picture the subway could be rendered on top of
everything and it would be OK from a logical point of view (it is already
the line style that denotes the location).

@mboeringa
Copy link

IMHO (and usually) a dashed line is used to denote a feature that is behind the visible plane. In this picture the subway could be rendered on top of everything and it would be OK from a logical point of view (it is already the line style that denotes the location).

I render all railway tunnels, including subway, as two thin parallel dashed lines on top of everything else. This corresponds with your view.

I don't render underground buildings at all. I think they clutter up the map to much, and make the map really unreadable in some places. I filter them out by a query like this:

(osm_level NOT LIKE ('%-%') OR osm_level IN (Null,'')) AND (osm_layer NOT LIKE ('%-%') OR osm_layer IN (Null,'')) AND osm_location NOT IN ('underground','underwater')

The "osm_" prefix for the field names is something specific for the OpenStreetMap Editor for ArcGIS that I use in my ArcGIS renderer.

Compare these two images for the difference, notice how the aboveground layout of the Rotterdam railway station is more clear without the underground facilities:

rotterdam_railway_station_osm

rotterdam_railway_station

@dieterdreist
Copy link

2014-11-17 19:26 GMT+01:00 mboeringa notifications@github.com:

I filter them out by a query like this:

(osm_level NOT LIKE ('%-%') OR osm_level IN (Null,'')) AND (osm_layer NOT
LIKE ('%-%') OR osm_layer IN (Null,'')) AND osm_location NOT IN
('underground','underwater')

this way you'll also miss all overground buildings which happen to have
negative layer values (remember, the layer tag is not telling anything
about above/below ground, it is refering to z-position relative to
crossing/overlapping objects).

@kvlahromei
Copy link
Author

BTW: If anybody says our tagging is incosistant and needs to be fixed (instead of the map style) I will do it with layer=* or level=* tags.

@dieterdreist
Copy link

2014-11-20 11:35 GMT+01:00 Matthias Meißer notifications@github.com:

BTW: If anybody says our tagging is incosistant and needs to be fixed
(instead of the map style) I will do it with layer=* or level=* tags.

no, the thing is more that there isn't a "right" or "wrong" and therefor no
"fix" for your problem: whether you display something hidden below or above
other objects (and which symbology you use to say that it is hidden behind)
is a matter of taste/style decision and not of right or wrong. But I think
there is agreement that either way the rendering should be consistent,
having the way rendered above the buildings and landcover but below squares
and roads is not nice. The question (IMHO) is whether we want the subway to
render below the buildings and landcover as well, or above the roads and
squares.

@matthijsmelissen
Copy link
Collaborator

I wil consider this issue after the building colour change is rolled out.

No need to change the tagging now I think.

@mboeringa
Copy link

this way you'll also miss all overground buildings which happen to have negative layer values (remember, the layer tag is not telling anything about above/below ground, it is referring to z-position relative to crossing/overlapping objects).

You're absolutely right regarding the "layer" key issue, and the significance and meaning of this key regarding z-position.

However, there is a quite common (mal)practice of using the "layer" key instead of "level" or "location" to register the underground position, or maybe more correctly said the fact that some building (often underground), is below others, by setting layer at -1. Often, no level or location is additionally set (the malpractice, if I may use this word at all, is of course not so much setting layer=-1 on a building, but forgetting to set level or location where appropriate...).

E.g., here in the Netherlands, it seems most subway stations only have "layer=-1" to signify their underground presence... no other keys to help out here. This seems more common unfortunately, also in other countries.

E.g. see here, near Rotterdam Centraal station:
http://www.openstreetmap.org/way/255337442

While potentially erroneous, assuming buildings with layer=-1 are below ground, is the only way to get a decent rendering if you want to exclude subsurface structures. It wont be right in all cases, but more often than not it will.

Considering probably 95-98% of all buildings on earth are currently not mapped in OSM, that is a risk I am willing to take...

Anyway, my ArcGIS renderer will be customizable, so people can "fix" this to their liking once it is released.

@matkoniecz
Copy link
Contributor

@mboeringa

The main problem is that it encourages bad tagging.

@mboeringa
Copy link

The main problem is that it encourages bad tagging.

Using layer=-1 on a building is, by itself, not bad tagging, although most Wiki pages recommend using level to signify the position of a floor of a building relative to "ground floor". The main problem is not using location or level where appropriate. And using the layer tag on buildings is somehow suggested in specific cases in this other GitHub issue (see remarks by @dieterdreist and @Morphan):

#688

Problem with level is of course, what do you do with entirely underground buildings, that do not "start" at ground level? What level to tag on an underground building with just elevator access? Probably -1, but anyway...

I guess the more generic "location=underground" may be more suitable to filter out underground structures... if it were tagged~!

Anyway, personally, I think there are more pressing issues to worry about in the rendering arena... I also honestly don't think this will lead to massive bad tagging... most people at least attempt to do the right thing.

@dieterdreist
Copy link

2014-11-23 18:24 GMT+01:00 mboeringa notifications@github.com:

However, there is a quite common (mal)practice of using the "layer" key
instead of "level" or "location" to register the underground position, or
maybe more correctly said the fact that some building (often underground),
is below others, by setting layer at -1. Often, no level or location is
set.

E.g., here in the Netherlands, it seems most subway stations only have
"layer=-1" to signify their underground presence... no other keys to help
out here. This seems more common unfortunately, also in other countries.

it is your own interpretation that "layer=-1" is used in these cases to
mark the underground location, infact, this tag only says that the station
is below other elements that is crosses/overlaps (and which have no or
higher layer tags). Nothing wrong with this tagging, it simply doesn't
convey any information about the building being above ground or not.

@mboeringa
Copy link

it is your own interpretation that "layer=-1" is used in these cases to mark the underground location, infact, this tag only says that the station is below other elements that is crosses/overlaps (and which have no or higher layer tags). Nothing wrong with this tagging, it simply doesn't convey any information about the building being above ground or not.

Agree 100% with all you write, but I would just rephrase "it is your interpretation" into "it is your way of rendering / styling the data". I am fully aware this is an undesirable "shortcut", but it is one that will work in most cases, as most buildings having layer=-1 do seem to be underground.

People are just unlikely to tag a building with -1 when it is in fact aboveground, simply because it "doesn't feel right". But I am the first to admit that additional tagging, preferably using the "location=underground" tag is highly desirable. Although the "level" key is less ambiguous than the "layer" key, it still is somewhat ambiguous as to whether something is aboveground or below. The "location" key, using actual tagging phrases with "underground"/"overground", seems to be most concise... But I am well aware there is a plethora of real world cases out there, with buildings having partly covered or artificial basements, that may make tagging what is "underground" actually not that straightforward as it may seem. Just look at something like the Van Gogh museum in Amsterdam:

https://www.google.nl/maps/@52.3580451,4.8812186,286a,20y,90h/data=!3m1!1e3

The right modern half-"egg" shaped part, has a basement with an outside open air "floor" (that is the left part in the above image link), one level below what is generally considered "ground level"...

@dieterdreist
Copy link

2014-11-24 22:25 GMT+01:00 mboeringa notifications@github.com:

Agree 100% with all you write, but I would just rephrase "it is your
interpretation" into "it is your way of rendering / styling the data". I am
fully aware this is an undesirable "shortcut", but it is one that will
work in most cases, as most buildings having layer=-1 do seem to be
underground.

People are just unlikely to tag a building with -1 when it is in fact
aboveground, simply because it "doesn't feel right". But I am the first to
admit that better tagging, preferably using the "location=underground" tag
is highly desirable. Although the "level" key is less ambiguous than
the "layer" key, it still is somewhat ambiguous as to whether something
is aboveground or below. The "location" key, using actual tagging phrases
with "underground"/"overground", seems to be most concise... But I am well
aware there is a plethora of real world cases out there, with buildings
having partly covered or artificial basements, that may make tagging what
is "underground" actual not that straightforward as it may seem. Just look
at something like the Van Gogh museum in Amsterdam:

https://www.google.nl/maps/@52.3580451,4.8812186,286a,20y,90h/data=!3m1!1e3

The right modern half-"egg" shaped part, has a basement with an outside
"floor" one level below what is generally considered "ground level"...

I also agree 100% with your text ;-)
Here's another "edge-case", an architectural icon from the 60ties, the
Berlin Neue Nationalgalerie by Ludwig Mies van der Rohe (maybe an antetype
of the Amsterdam museum you posted), (Google 3D doesn't really manage to
make us understand why this is an iconic building):
https://www.google.nl/maps/@52.5037007,13.373287,179a,20y,313.78h,71.56t/data=!3m1!1e3

Seen from the (main) street you have the impression to see a modern temple
(in glass and steel), typically void, you enter at the ground level and go
one level down to enter the exhibition, which is partly below ground and
partly (at the "garden" side) at ground level (because of modified
terrain). In those cases, it is not completely clear what "ground" refers
to (e.g. if artificial "ground" is part of the ground or of the building).
Naturally, also most buildings on hills/slopes have this ambiguity. If it
is not clear in the real world, how to interpret a situation, than it will
also be difficult to do it in mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants