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

Further water layer name dropping at low zooms #1730

Closed
1 of 3 tasks
nvkelso opened this issue Dec 14, 2018 · 7 comments
Closed
1 of 3 tasks

Further water layer name dropping at low zooms #1730

nvkelso opened this issue Dec 14, 2018 · 7 comments

Comments

@nvkelso
Copy link
Member

nvkelso commented Dec 14, 2018

Following up from #1477 and https://github.com/tilezen/vector-datasource/pull/1714/files, and based on original zoom & area table in #1477 (comment).

We can drop even more water layer labels derived from polygons at zooms 0-5.

Zooms 6+ seems mostly okay. But I don't understand how that works... seems like we drop water labels based on a width / area treshhold – where does that happen?

But there's also funk with how the Natural Earth names are brought in at low zooms which make it look better than it should? Example at bottom.

Need to change so:

  • No lake labels at zoom 0-3
  • Then zoom 4 and 5 have different threshold:
  • Then zoom 6+ no change? Might need zoom 6,7 for Natural Earth of the area threshold is OSM only?
                        - { $zoom: { min: 4 },  area: { min: 40000000000 } }
                        - { $zoom: { min: 5 },  area: { min: 10000000000 } }

The original in https://github.com/tangrams/walkabout-style/blob/gh-pages/walkabout-style.yaml#L1258-L1279

        water-area-labels:
            visible: global.text_visible_water_labels
            filter:
                all:
                    - name: true
                    - $geometry: point
                    - not: { kind: [riverbank, dock, playa] }
                    - area: true
                any:
                    # show labels for smaller landuse areas at higher zooms
                    - { $zoom: { min: 5 },  area: { min: 10000000000 } }
                    - { $zoom: { min: 6 },  area: { min: 5000000000 } }
                    - { $zoom: { min: 7 },  area: { min: 400000000 } }
                    - { $zoom: { min: 8 },  area: { min: 200000000 } }
                    - { $zoom: { min: 9 },  area: { min: 100000000 } }
                    - { $zoom: { min: 10 }, area: { min: 10000000 } }
                    - { $zoom: { min: 11 }, area: { min: 4000000 } }
                    - { $zoom: { min: 12 }, area: { min: 750000 } }
                    - { $zoom: { min: 13 }, area: { min: 100000 } }
                    - { $zoom: { min: 14 }, area: { min: 50000 } }
                    - { $zoom: { min: 15 }, area: { min: 10000 } }
                    - { $zoom: { min: 16 } }

Desired at zoom 4:

image

Present in v1.6c:

image

Desired at zoom 5:

image

Present in v1.6c:

image

Notice how there's no default name here, but there is name:en:

6/40.772/-116.609

image

@nvkelso nvkelso added this to the v1.7.0 milestone Dec 14, 2018
@nvkelso nvkelso modified the milestones: v1.7.0, v1.6.1 Dec 28, 2018
@nvkelso nvkelso changed the title Further water layer name dropping Further water layer name dropping at low zooms Dec 29, 2018
@ghost ghost assigned zerebubuth Jan 7, 2019
@ghost ghost added the in review label Jan 7, 2019
@nvkelso
Copy link
Member Author

nvkelso commented Jan 23, 2019

Doesn't look like this is on dev yet.

@zerebubuth
Copy link
Member

That's weird. I was pretty sure we made the cut-off for this one, and I'm seeing the sort of things I'd expect on dev. For example, I just checked:

  1. The lakes are not named at zoom 3.
  2. Only the largest at zoom 4. For example; Lake Winnipeg is named, Reindeer Lake is not.
  3. Smaller lakes at zoom 5 not named. For example; Reindeer Lake is now named, Wollaston Lake is not.
  4. All names dropped from Pyramid Lake at zoom 6, all names present at zoom 7.

It's possible that there's some other example that I've missed, or a bug which is making it look like it's not on dev properly. If so, please share an example and I'll check it out.

@nvkelso
Copy link
Member Author

nvkelso commented Jan 23, 2019

Here's what I see, using Bubble Wrap and the following local config (removes the any clause, too), using the dev server:

        water-labels:
            filter:
                all:
                    - name: true
                    - function() { return global.text_visible_water_labels; }
                    - $zoom: { min: 1 }
            water-area-labels:
                filter:
                    all:
                        - $geometry: point
                        - not: { kind: [riverbank, dock, playa] }
                        - area: true
                default-label-text:
                    draw:
                        text-blend-order:
                            text_source: global.ux_language_text_source
                            text_wrap: 10
                            font:
                                fill: [0.314,0.591,0.640] #global.text_fill_water
                                family: global.text_font_family
                                style: italic
                                weight: normal
                                size: [[6,10px],[6,12px]]
  1. The lakes are not named at zoom 3.

image

image

image

  1. Only the largest at zoom 4. For example; Lake Winnipeg is named, Reindeer Lake is not.

image

  1. Smaller lakes at zoom 5 not named. For example; Reindeer Lake is now named, Wollaston Lake is not.

image

  1. All names dropped from Pyramid Lake at zoom 6, all names present at zoom 7.

image

image

image

@zerebubuth
Copy link
Member

Ah, yes, I see what's going on. Sorry - my mistake.

The polygons were getting their names stripped correctly, and that's what I was seeing in the tile and tests. However, there were additional label placement points generated from the lake boundaries which I hadn't accounted for in the test, and which Bubble Wrap was hiding client-side due to the area rules.

I think the changes I'm proposing in #1805 should fix this.

@nvkelso
Copy link
Member Author

nvkelso commented Feb 1, 2019

I do see this working now...

But the min_zoom reflects the original NE min_zoom, not the filtered min_zoom for when they are actually shown. That should line up.

Like this feature is only in tiles at zoom 4+, but the min_zoom says 1. It should instead say 4.

image

@zerebubuth
Copy link
Member

min_zoom should be updated on labels after #1812.

@nvkelso
Copy link
Member Author

nvkelso commented Feb 14, 2019

Verified:

image

@nvkelso nvkelso closed this as completed Feb 14, 2019
@ghost ghost removed the in review label Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants