Giter Site home page Giter Site logo

[BUG] TransportationName: calculate rank doesn't handle major roads that are not part of a preconfigured network about planetiler HOT 10 CLOSED

onthegomap avatar onthegomap commented on May 17, 2024
[BUG] TransportationName: calculate rank doesn't handle major roads that are not part of a preconfigured network

from planetiler.

Comments (10)

boldtrn avatar boldtrn commented on May 17, 2024 1

Sounds good, thanks for your work @msbarry 👍

from planetiler.

boldtrn avatar boldtrn commented on May 17, 2024

Haven't heard back, is this something you would like a contribution? Or is this something that wouldn't be that relevant to you?

from planetiler.

msbarry avatar msbarry commented on May 17, 2024

Hey sorry I just haven't had a chance to look into this. For B313 at least it looks like it does show up (because each of the ways in it also has a ref tag), but only starting at z12:

image

The reason it doesn't show up at z11 and below is that openmaptiles sets a min length of 8km for transportation_name segments to appear at z11. The trunk portion of B13 is just over 9km so gets emitted, but planetiler translates that length limit to a min pixel size of the feature on a tile and that segment happens to cross a tile boundary

image

I can see two fixes here:

  1. Use a larger buffer for transportation_name tiles at z11 and below so the min length computation includes the full segment
  2. Then maybe to catch the case where a way is in a relation that has a ref but no network (and there's no ref on the way) we could add an option that breaks from openmaptiles compatibility and uses that ref on the transportation_name linestring

What do you think @boldtrn ?

from planetiler.

msbarry avatar msbarry commented on May 17, 2024

Use a larger buffer for transportation_name tiles at z11 and below so the min length computation includes the full segment

Actually we already do that... it turns out that the issue here is that some onramps/offramps to B313 are tagged with ref=B 313 (for example https://www.openstreetmap.org/way/845773628) and the line merging code stops merging at 3-way intersections and none of the line segments ends up exceeding the 8km min-lenth limit. I'm planning to refactor the line merging code at some point (#54) so it's more robust to these kinds of issues.

In the meantime you can run planetiler with --transportation-name-limit-merge which groups onramps separately from main roads. When I run with that option, I can see B313 shield as low as z8

image

That option is disabled by default since it differs from openmaptiles, but if you find that the output is actually closer to openmaptiles with it enabled then we can enable it by default.

from planetiler.

boldtrn avatar boldtrn commented on May 17, 2024

Thanks @msbarry for the proposal. Are there any side-effects when using --transportation-name-limit-merge? Is there anything I should look out for when using this parameter?

from planetiler.

msbarry avatar msbarry commented on May 17, 2024

Nope, it should be isolated to only affect transportation_name layer, and in general will make road labels show up a bit more frequently on the map at lower zooms. It should not be a huge difference though.

from planetiler.

boldtrn avatar boldtrn commented on May 17, 2024

Thanks @msbarry this parameter seems to indeed improve the rendering of highway signs. Compared to OMT there are still fewer highway signs (B10 and A8 are still missing).

Screenshot 2022-04-13 at 17 35 26

Is there be something else that I could try? If a code change is required I can create a PR as well, but I might need a hint or two :).

from planetiler.

msbarry avatar msbarry commented on May 17, 2024

Are you sure they're not showing up in the underlying tile data and it's not a style rendering issue? When I look in tileserver-gl I see B10 and A8:

image

from planetiler.

boldtrn avatar boldtrn commented on May 17, 2024

Thanks for the hint, you are right, sorry for the troubles, they indeed appear in the data (I should have checked that).

Should we close this issue then?

from planetiler.

msbarry avatar msbarry commented on May 17, 2024

@boldtrn I think this is good to close for now? #298 tracks the long-term improvements to feature merging

from planetiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.