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

Show more disputed lines for POV in low zooms #1970

Closed
nvkelso opened this issue Aug 31, 2021 · 4 comments
Closed

Show more disputed lines for POV in low zooms #1970

nvkelso opened this issue Aug 31, 2021 · 4 comments
Assignees
Milestone

Comments

@nvkelso
Copy link
Member

nvkelso commented Aug 31, 2021

To solve "gaps" in the country boundary lines at low zooms sourced from Natural Earth, we need to be more liberal in NOT filtering by min_zoom all the time, just for that layer and features (country, disputed, region kinds in boundary layer).

tilezen_v1d8_disputed_boundaries

Per nvkelso/natural-earth-vector#301 (comment):

Adjust min_zoom of disputed lines to be smaller when one or more of their claimants needs them earlier to complete their own country boundary line at lower zooms. See China along India, Pakistan, Bhutan salients.

The simplest thing to do is in QGIS (and for vector tiles) is to always include features from the scalerank theme (so remove the min_zoom filters) as for default the current min_zoom is ideal... but otherwise we'd need to include optional min_zoom_{pov} for all the POV and there are an insane number of columns as it is.

If we were to add various min_zoom_{pov} then downstream QGIS and vector tiles would need to take the minimum min_zoom_{pov}for inclusion at that zoom... but that's not something QGIS's basic layer filters are setup for, and the layer styling is already pretty complicated as it is.

@nvkelso nvkelso added this to the v1.9.0 milestone Aug 31, 2021
@nvkelso
Copy link
Member Author

nvkelso commented Nov 1, 2021

Relevant code:

One way to do this is to split apart the disputed lines from the international boundary lines (this may need to be a little more sophisticated – for instance you could test if there is a fclass_xx that's not null):

  # ne
  - filter:
      featurecla:
        - 'International boundary (verify)'
        - 'Disputed (please verify)'
        - 'Indefinite (please verify)'
        - 'Indeterminant frontier'
        - 'Lease limit'
        - 'Line of control (please verify)'
        - 'Overlay limit'
        - 'Unrecognized'
        - 'Map unit boundary'
    min_zoom: { col: min_zoom }
    output:
      <<: *output_properties
      <<: *ne_localized_kind_properties
      kind: *ne_country_boundaries_kind
      kind_detail: '2'
    table: ne

# ne for disputed kind:xx POV we want to always include
# the disputed lines early so when that POV enables them
# the data is available in tiles
  - filter:
      featurecla:
        - 'Breakaway'
        - 'Claim boundary'
        - 'Elusive frontier'
        - 'Reference line'
    min_zoom: 1
    output:
      <<: *output_properties
      <<: *ne_localized_kind_properties
      kind: *ne_country_boundaries_kind
      kind_detail: '2'
    table: ne

@nvkelso
Copy link
Member Author

nvkelso commented Nov 2, 2021

This only should matter for the last 4 here:

        - [ 'disputed_breakaway', 'Breakaway' ]
        - [ 'disputed_claim', 'Claim boundary' ]
        - [ 'disputed_elusive', 'Elusive frontier' ]
        - [ 'disputed_reference_line', 'Reference line' ]

@nvkelso
Copy link
Member Author

nvkelso commented Nov 2, 2021

Test in this tile at zoom 4:

Right now there are no features with kind:cn = country and you want there to be some, and test the min_zoom being the new value of 1.

This zoom 5 feature, with these attributes (modulo min_zoom) should also be included at zoom 4:

image

Because Natural Earth 1:50m has this disputed boundaries in it and Tilezen uses from zoom 2, 3, 4 this will work.

The change would also set the min_zoom in the zoom 5 tiles from NE 1:10m to 1 as well, so you should also test that.

Because the NE 1:110m doesn't include disputed boundary lines at all in the upstream data, this is not testable at zoom 0 and 1. If we need to fix this at those zooms, we need an upstream NE data fix.

@peitili peitili mentioned this issue Nov 4, 2021
2 tasks
@peitili peitili closed this as completed Nov 15, 2021
@peitili
Copy link
Contributor

peitili commented Nov 15, 2021

image
feature appears in newly build

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

2 participants