-
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
OSM localities joins NE and prefers NE population to calculate population_rank #2048
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am going to do a mini build on California to generate some rendered tiles to verify the change. |
nvkelso
reviewed
Jan 27, 2022
nvkelso
reviewed
Jan 27, 2022
nvkelso
reviewed
Jan 27, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
nvkelso
reviewed
Jan 28, 2022
LGTM but let's see it in a mini build The CI tests failing are the olds ones, not the new ones. |
ecb4a82
to
baceead
Compare
nvkelso
approved these changes
Feb 1, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM included Q&A in a mini build.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
#2020
When zooming across the NE <> OSM boundary around zoom 8, townspots shift position, population_rank values change, and min_zoom values change.
For country labels in the same places theme we do a join on WikidataID and apply the NE min_zoom to the OSM features.
We should do the same type of harvesting for localities. Namely:
OSM localities should get their population_rank and min_zoom values from NE.
The population value should not be adjusted, as that's for the incorporated area, while the NE population_rank is for the metro area and is more useful for label grading in the stylesheet.
Changes
__ne_max_zoom
,__ne_min_zoom
,__ne_pop_min
and__ne_pop_max
to the json objectpopulation_rank
field{"population": None}
in the json object doesn't end up getting the default estimate population value.Existing Test Changes
1 Why there is a change necessary for
integration-test.988-add-population-to-collision-rank.PopulationRankTest.test_0
?In fact, this test breaks on master too, and this PR fixes it.
2 Why there is a change necessary for
integration-test.988-add-population-to-collision-rank.PopulationRankTest.test_collision_rank_decreasing
?When the data has tag
population: None
it falls into following filter line in places.yaml (surprisingly?!)vector-datasource/yaml/places.yaml
Line 144 in 80799e7
and thus it won't have the hardcoded estimate population value
10000
forkind_detail: city
, it will have population value be0
.Because we moved the estimation population backfill logic from the yaml file to the transform function, and the transform function is executed at a later stage than the yaml file logic, now when tag
population: None
happens, it gets a chance to take the hardcoded estimate population value10000
. And thus thecollision_rank
value changes and as a result, original test breaks. So one way to make this test pass again and more reasonable is to not start from tagpopulation: None
but frompopulation: 0
.