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

urban area polygons #5

Open
wendellwt opened this issue Oct 15, 2021 · 1 comment
Open

urban area polygons #5

wendellwt opened this issue Oct 15, 2021 · 1 comment

Comments

@wendellwt
Copy link

I (finally!) created my own map using the instructions you provided (but using pg_tileserv as the server). In displaying the data, it seems that the ne_10m_urban_areas_landscan dataset contains extra polygons within some of the city boundaries as shown here: chicago polygons

Why is that? Are there selectors either in the database population step or the tile retrieval step that could be used to eliminate the extra polygons? When the urban areas are displayed with a semi-transparent style it makes the urban areas look confusing.

Thank you,
Wendell

@acalcutt
Copy link
Owner

This is part of load_naturalearth.sh, which I based on an old obsoleted openmaptiles docker image here ( https://github.com/openmaptiles/import-natural-earth )

The original for this downloaded an sqlite file from natural earth, then deleted some tables(like that 'ne_10m_urban_areas_landscan' you mentioned), with this script ( https://github.com/openmaptiles/import-natural-earth/blob/master/clean-natural-earth.sh ).

However, I ended up finding natural earth tables that were missing when I did it the way the docker image did it, which caused generated sql script that run later to fail. In my load_naturalearth.sh I ended up making my own 'natural_earth_vector.sqlite' file by taking all the 10m,50m,and 110m natural earth shape file downloads and then using ogr2ogr to append them into an sqllite file, then importing the sqlite file into the postgres database. In my version I just left all the unused tables because they didn't get in the way of anything I was doing, so that 'ne_10m_urban_areas_landscan' table could probably be removed.

At one point I had tried to modify the load_naturalearth.sh script so that it went right from shape into postgres, but it caused the sql scripts to fail and I reverted it back to what worked

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