-
Notifications
You must be signed in to change notification settings - Fork 120
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
Update road sort_key values (paired with landuse updates) #546
Comments
Here's the Holland Tunnel with a sort_key of In previous versions of Eraser Map stylesheet, this eastern portion of the tunnel was under the water polygon, completely obscuring the tunnel feature. It only works today because we hack the server data values by adding 6 to everything. |
Initial Recommendations: This is dependent on final
Question:
Constraints:
Research:
2a) At zooms >=15, the In these "high zooms", the basic
2b) But there is one other zooms >=15 modification based on OSM's layer tag (which is used to "describe vertical relationships between crossing or overlapping features").
Which results in a total range of [0,39]. NOTE: Looks like we currently only support layer values in the ±5 in our code today, which matches the wiki. But reviewing layer values on TagInfo, most values are ±5, but there are a few ±6 and even ±7.
|
@zerebubuth, @rmarianski, @bcamper, @blair1618, @meetar, @sensescape to sanity check |
How much room?
Aerialways are currently always treated like bridges and get a +10 when zoom >= 15. The issue is that the range of values we allowed ourselves was so small that they got "clipped" to 34 always (+/- layer changes).
We don't assume aerialways always have a layer tag, and in the absence of a layer tag they are treated like bridges. In what way is it broken in the Eraser Map app, and what values for
What do you mean by "incorrectly interacting" - are they z-fighting? What would be the correct behaviour and the |
|
I propose the following in the Open Office sort_key.ods.zip doc:
The New York city example shows the Roosevelt Island Tramway sorting under FDR Dr instead of above it. My proposed value in in the same Open Office document: I'm proposing if the feature is @zerebubuth and @bcamper
Near the SF Mapzen offices The Bay Bridge highway should be flying over the anchorage buildings (they top out at the same level) and the pier buildings (the bridge is far higher than these 2 story buildings). Have you ever run into it before? I'm not sure what sort_key value is needed to fix this going forward, that's partly why I'm proposing space in the ranges to put buildings below or above roads (it could also vary by zoom, a common practice not yet adopted by our stylesheets). Looking at how Eraser Map and Skin & Bones are written today, it's getting a |
Ah, that's bad data - the Roosevelt Island Tramway doesn't have a layer tag, which implies
As I understand it (and, @bcamper please correct me if I'm wrong), all the extruded buildings have a z-depth less than any other feature. I think this means we'd need to not extrude the anchorage buildings and give them some |
Cool, I'll fix the data and we'll leave that logic for aerialways, bridges, and layers as-is.
Clever! Looks like most of those are tagged correctly in OSM for the Bay Bridge and we're passing them through (as
|
It's my understanding that extruded things (things with "real" depths in the z-buffer) can't be below 2D things (things with It should be possible to "float" roads above buildings, as it's using a 3D rendering engine under the hood. But I feel like it would take considerable work in Tangram to replicate some of the stuff we're doing with |
@zerebubuth has the gist of it. A road geometry cannot be made to draw over an extruded building geometry by changing its "Why does order behave so strangely?" you might wonder. The answer is that this behavior is the most consistent way we could find to represent mixed 2D and 3D geometry. It's a tricky problem! The "tiebreaker" behavior of |
Wasn't this what overlay blend-mode is for? I recall to have seen all transport platform 'shine' through buildings, which looked a bit odd for tilted view though |
To elaborate, in the future it would be interesting as @blair1618 says to extrude bridge geometries. But to do so we'd need more info on geometry semantics than we currently have, since we don't know where the bridge starts and ends, or more generally what the desired elevation for each point along the line is (relevant because bridges may be broken into multiple features "mid-air", and even if stored as a single feature, will get split across tiles). If the server could pre-compute either a height or simply a classification for each vertex of the bridge (e.g. "ground" or "elevated"), we could construct an extruded polyline with variable height. |
@blair1618 and @zerebubuth Thanks for the background, makes sense. Works for today and tomorrow. Someday: full virtual globe. Elevation is a good downpayment to that challenge! 😉 One final test case: is there a way to make this legit building under the bridge? If I took the height off it then it'd still be extruded the default amount of 20. Looks like one of the common mapping apps kills that and similar buildings under bridges. The other draws them transparently / sometimes drops the heights on them, so the problem is less obvious (something that might or might work for Geraldine's design, could on other designs). Even that zero height building is still z-stacked above the bridge. |
@hjanetzek Good eye, and I agree that's a bug! The new sort_key (order) values I'm proposing would fix it so transport platforms would be below buildings. We can explore overlay blend-mode on the buildings, too. |
We could add a post-process filter to add a property (
Yeah, that'll be far, far future - the connectivity information is lost by the transform to OGC / PostGIS data types. Getting it back by examining the mid tables might be quite slow. Insert usual rant about NEAT tiles being the One True Solution here. |
@rmarianski Can you list out where the ways with layer={6,7,-6,-7} are so we can evaluate how important those are? |
Updated:
|
@bcamper and @blair1618 Can you confirm we don't do bit packing on the order (and we have range to utilize)? |
Right, we can't pack the order ranges because we don't know a priori what the ranges are, and we can only examine data per-tile. |
@nvkelso attached is the list of lines and polygons in the dev database that have a layer value of -7, -6, 6, or 7. |
tl;dr longer version: Taking a random sampling of layers with ±6, ±7, we have mine tunnels, parking structure aisles, river, underground streams, RER railroad tunnels, public transport platforms, and amusement park rides. Here's a particularly awesome one (parking aisles in parking structure): |
@nvkelso That openoffice doc is fascinating. Is there anywhere I can learn more about its origins? |
It's me going thru the shiny new documentation for tiles and all (!?) our scene files (mostly Eraser Map, Skin & Bones, Refill) and figuring out where things lie now and where we should put them. If you see something amiss, please let me know! |
As we widen the range of landuse sort_key values in in #364 and #504, we need to offset the roads up at the same time.
Complicating this, road tunnels (and any negative layer value) sometimes conflict with landuse (explicate) and water (implied) sort keys. In New York City, part of the tunnel under the Hudson to New Jersey has
layer=-2
so it's currently out of the road range into the landuse range. We need to include a healthy buffer between these ranges!The text was updated successfully, but these errors were encountered: