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

Odd metadata issues #162

Open
nuclearsecrecy opened this issue Oct 25, 2023 · 4 comments
Open

Odd metadata issues #162

nuclearsecrecy opened this issue Oct 25, 2023 · 4 comments
Assignees

Comments

@nuclearsecrecy
Copy link
Sponsor

Hello! This is a very cool project.

I've been trying to do styling of the most-current basemaps, and I've noticed lots of odd metadata errors. For example, the min_zoom on place=state entities outside of the United States is arbitrarily high (e.g., Northern Ireland doesn't show up until zoom=9, which is so zoomed in that it is kind of useless; Rhode Island is available at zoom=2, by comparison). And pmap:population_rank seems really wrong in some cases (Mexico has a population_rank of 1 with a population of 127 million, Cuba has a population_rank of 14 with a population of 11 million).

Anyway, my question is just: where is this particular metadata data being drawn or derived from? Mexico's OSM data did not have a population tag, so it makes sense that this might throw off its population_rank calculation. I checked and Norway also has no population data in the latest map built, even though its OSM entry does have it and has for some time. So I don't know.

My guess is that the zoom levels for states is also based on a population rank like most places? If so, perhaps it should be made a bit more liberal where place=state, because it is a little inflexible in its current form.

Thank you!

@bdon
Copy link
Member

bdon commented Oct 28, 2023

The min_zoom is derived from Natural Earth and @nvkelso 's work, and those are hand-edited values for generalization because OSM does not store non-verifiable information. Same with population_rank.

States are a special case because ideally we want to show all of the states at the same time or none of them in the cases where we label them at a low zoom.

Screenshots would be helpful

@nuclearsecrecy
Copy link
Sponsor Author

I don't think a screenshot is all that useful here since I'm talking about metadata.

If you load up the latest pmtiles archive in the PMTiles Viewer (I am using 20231025), and look at the data that shows up for Mexico's name entry on the places layer, this is what it currently has if you strip out all of the name translations:

pmap:kind_detail	country	
pmap:population_rank	1		
population	0	
name	México	
place	country	
pmap:kind	country	
wikidata	Q96	
pmap:kind	earth	

By comparison, the United States has a a pmap:population_rank of 17. If the population_rank is 1, it means that the metadata has 0 for the population, I think. Norway has the same issue.

And, again, the US states are given very low zoom levels — which is fine! — but some other states of similar significances, like Wales, Scotland, Northern Ireland, etc. (which are considered state-level entities part of the United Kingdom) have really, really high minimum zooms, so you will just never see the state name unless you are happening to zoom in on just the right part of the map. Scotland's name won't show up until zoom=8 which is really high for a place the size of Scotland, and you have to know exactly where it is if you are ever going to see it, because Scotland is relatively large compared to that zoom:

https://imgur.com/RbJc6Ad

There should be a way to update these things without resorting to doing it manually, no? OSM definitely allows one to add population data into its entries. I had imagined that the pipeline would take the OSM population field and then run something on it to make a population_rank field, but I guess not?

(Is Natural Earth being updated? The last build on their website seems to be from 2018.)

@nvkelso
Copy link
Collaborator

nvkelso commented Oct 28, 2023

These all sound like data, curation, and/or data join issues. Thanks for the examples, I'll dig into them.

FYI: Last Natural Earth update was in 2022, and we're preparing version 6 for release in 2024.

@nvkelso nvkelso self-assigned this Oct 28, 2023
@bdon
Copy link
Member

bdon commented Oct 31, 2023

I don't think a screenshot is all that useful here since I'm talking about metadata.

Our design principle is that the key/value tags in the tileset drive the visual style; the tileset is not meant to be a general-purpose geodatabase. Tags such as pmap:population_rank are used to determine the size or font-weight of the textual label associated with that. So screenshots are always useful because the end result of erroneous tags like you pointed out are inappropriately sized or missing labels at a specific zoom level in the map. You're right that there seems to be some odd numbers in there - we'll investigate.

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

3 participants