-
Notifications
You must be signed in to change notification settings - Fork 152
Improve data download and process workflow #21
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
Improve data download and process workflow #21
Conversation
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.
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- Makefile: Language not supported
- scripts/requirements.txt: Language not supported
|
LGTM! |
Thanks for the fast approval. I'll add some comments for traceability. |
|
You are welcome 👍! |
| if [ ! -f ne_10m_admin_0_countries.zip ]; then curl -L -o ne_10m_admin_0_countries.zip https://naciscdn.org/naturalearth/10m/cultural/ne_10m_admin_0_countries.zip; fi | ||
|
|
||
| data: download | ||
| ogr2ogr -f GeoJSON -makevalid -lco COORDINATE_PRECISION=6 -sql "SELECT admin as name, iso_a3 as \"ISO3166-1-Alpha-3\", iso_a2 as \"ISO3166-1-Alpha-2\" FROM ne_10m_admin_0_countries" data/countries.geojson /vsizip/ne_10m_admin_0_countries.zip |
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.
why makevalid
the original geojson from NaturalEarth contain invalid geometry features and this flag auto correct the invalid features.
also fixes:
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.
why "COORDINATE_PRECISION=6"
source dataset from natural earth is at 10m res and 6 decimal place is sufficient
reducing to 6th decimal also reduces the file size.
re:

Changes:
makevalidoptionsNotes:
data update is not included in the commit, but will be triggered by Actions