Replies: 2 comments 2 replies
-
I'm not exactly sure why transportation and transportation_name are separate layers in openmaptiles. Typically styles render transportation as lines and transportation_name as text or symbols. You could either add names to transportation, or add ids to transportation_name (and set a smaller min size) to avoid combining them. Another option if you're not too tied to openmaptiles would be switching to protomaps which just has one "roads" layer with names: https://github.com/protomaps/basemaps/tree/main/tiles |
Beta Was this translation helpful? Give feedback.
-
My educated guess is: to fit more labels. Imagine a "Main Street", that has different attributes every few meters, like speed limits, surface, lanes, etc. A renderer like maplibre treats each section individually and would try to fit the street name on each tiny section, whereas on transportation_name has only one attribute, and sections of the road can easily combined into one single line and therefore make it easier to find a big enough space for the text. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Firstly, apologies if this has been discussed before or the answer is obvious - I've searched and pondered and come up with nothing.
We're generating a protomaps file to be served up to our app and it's used in two ways:
For the second item we've been hoping to just use stock
planetiler
and using--simplify-tolerance-at-max-zoom=0
we can generate tiles in which we can find all of the intersections. The problem we have is that we end up with duplication of roads from thetransportation
andtransportation_name
layers and I haven't found a way to successfully de-duplicate them.My first question is why are the roads duplicated? Is it that it's just what the openmaptiles spec requires? I assume that for drawing graphical maps this doesn't matter?
Given that they are duplicated, how do I de-duplicate them? I think the main underlying issue is that the transportation layer merges many paths/minor roads etc. into
MultiStrings
which is great, except theid
for those Features is just for one of theLineStrings
and so can't be used to de-duplicate lines from thetransportation
layer with lines from thetransportation_name
layer.If I alter
Transportation.postProcess
to add the id() as a tag on every item when at the max zoom level:it seems to do what I want. I get a feature with a
LineString
for each OSM id and so obviously the file size goes up (by ~2% on my test map of Scotland), but given what I want to do, is this a reasonable approach?Many Thanks,
Dave Craig.
https://github.com/Scottish-Tech-Army/Soundscape-Android
Beta Was this translation helpful? Give feedback.
All reactions