Skip to content

Repository files navigation


Logo

tinygpkg-data

Small, TWKB compressed, and simplified GeoPackage datasets to be used with tinygpkg.

Report Bug · Request Feature

Table of Contents
  1. About
  2. Datasets
  3. Featured Variants
  4. Parameters
  5. Variants
  6. Contributing
  7. License
  8. Acknowledgements

About

This repository contains a set of scripts and tools for generating Tiny Well-known Binary (TWKB) compressed GeoPackage files from various open data sources. Check out Featured Variants or releases to download the data or keep reading for more details and comparisons.

Datasets

NameContentsFeaturesSourceLicense
ne_110m_admin_0_countriesCountry borders, 1:110m scale177Natural EarthPublic Domain
ne_10m_admin_0_countriesCountry borders, 1:10m scale258Natural EarthPublic Domain
ne_10m_urban_areas_landscanBig cities only, 1:10m scale6018Natural EarthPublic Domain
geoBoundariesCGAZ_ADM0Country-level administrative boundaries200geoBoundariesAttribution required
geoBoundariesCGAZ_ADM2City-level administrative boundaries49689geoBoundariesAttribution required

Featured Variants

These are some selected useful variants of the datasets. See Variants for the full list.

FileDescriptionSize (vs. source)Gzipped size (vs. source)
Tiny (TWKB)
📥 ne_110m_admin_0_countries_s5_twkb_p3117 country borders393 KB
46.9% of 838 KB
116 KB
56.0% of 208 KB
📥 ne_10m_admin_0_countries_s4_twkb_p3258 country borders1249 KB
9.4% of 13287 KB
782 KB
17.0% of 4614 KB
📥 ne_10m_urban_areas_landscan_s5_twkb_p36018 city borders4333 KB
7.5% of 57682 KB
1780 KB
22.0% of 8078 KB
📥 geoBoundariesCGAZ_ADM2_s5_twkb_p349689 city borders16420 KB
6.0% of 272859 KB
10782 KB
6.4% of 168993 KB
Compatible (WKB)
📥 ne_110m_admin_0_countries_s5_wkb117 country borders557 KB
66.4% of 838 KB
215 KB
103.8% of 208 KB
📥 ne_10m_admin_0_countries_s4_wkb258 country borders4997 KB
37.6% of 13287 KB
2566 KB
55.6% of 4614 KB
📥 ne_10m_urban_areas_landscan_s5_wkb6018 city borders21704 KB
37.6% of 57682 KB
4663 KB
57.7% of 8078 KB
📥 geoBoundariesCGAZ_ADM2_s5_wkb49689 city borders52469 KB
19.2% of 272859 KB
34726 KB
20.5% of 168993 KB

Parameters

The makevalid variant is the original source file converted to GeoPackage format using ogr2ogr with the -makevalid flag. This ensures a consistent intermediary format with valid geometry that is then further simplified and compressed.

Source datasets are minified using two methods, simplification and Tiny Well-known Binary (TWKB) compression.

Simplification is performed using the Ramer-Douglas-Peucker Simplify method on the polygons. If the simplification fails (creates an invalid polygon), less and less simplification is used until the polygon remains valid. If the polygon has less than "Min. Points", it is not simplified.

Precision is the maximum number of decimal places used to store the coordinates using TWKB. From empirical testing, less than 3 decimal places does not save a lot of space and more than 3 decimal places does not gain a lot in precision for these datasets.

The wkb variants are only simplified and not compressed, keeping the original Well-known Binary (WKB) format. This increases compatibility with other tools at the cost of larger file size.

NameSimplifyMin. PointsPrecision
makevalidnonen/afull
s3_twkb_p31203
s4_twkb_p30.1203
s5_twkb_p30.01203
s6_twkb_p30.001203
s7_twkb_p30.0001203
s8_twkb_p30.00001203
s3_wkb120full
s4_wkb0.120full
s5_wkb0.0120full
s6_wkb0.00120full
s7_wkb0.000120full
s8_wkb0.0000120full

Variants

These are the variants of the datasets available. Each variant is a combination of the parameters described above.

ne_110m_admin_0_countries

Country borders, 1:110m scale sourced from Natural Earth (Public Domain).

See Parameters for what each variant means and Datasets for details on the dataset itself.

VariantSizeworldeuropeafricausajapan
📥 makevalid569 KB
📥 s3_twkb_p3352 KB
📥 s4_twkb_p3393 KB
📥 s5_twkb_p3393 KB
📥 s6_twkb_p3393 KB
📥 s7_twkb_p3393 KB
📥 s8_twkb_p3393 KB
📥 s3_wkb409 KB
📥 s4_wkb520 KB
📥 s5_wkb557 KB
📥 s6_wkb557 KB
📥 s7_wkb557 KB
📥 s8_wkb557 KB

ne_10m_admin_0_countries

Country borders, 1:10m scale sourced from Natural Earth (Public Domain).

See Parameters for what each variant means and Datasets for details on the dataset itself.

VariantSizeworldeuropeafricausajapan
📥 makevalid9457 KB
📥 s3_twkb_p3921 KB
📥 s4_twkb_p31249 KB
📥 s5_twkb_p31441 KB
📥 s6_twkb_p31810 KB
📥 s7_twkb_p32146 KB
📥 s8_twkb_p32158 KB
📥 s3_wkb3002 KB
📥 s4_wkb4997 KB
📥 s5_wkb5984 KB
📥 s6_wkb8462 KB
📥 s7_wkb9179 KB
📥 s8_wkb9297 KB

ne_10m_urban_areas_landscan

Big cities only, 1:10m scale sourced from Natural Earth (Public Domain).

See Parameters for what each variant means and Datasets for details on the dataset itself.

VariantSizeworldberlinnyctokyoljubljana
📥 makevalid48156 KB
📥 s3_twkb_p35599 KB
📥 s4_twkb_p33788 KB
📥 s5_twkb_p34333 KB
📥 s6_twkb_p36119 KB
📥 s7_twkb_p36131 KB
📥 s8_twkb_p36127 KB
📥 s3_wkb30052 KB
📥 s4_wkb18726 KB
📥 s5_wkb21704 KB
📥 s6_wkb34611 KB
📥 s7_wkb34639 KB
📥 s8_wkb34643 KB

geoBoundariesCGAZ_ADM0

Country-level administrative boundaries sourced from geoBoundaries (Attribution required).

See Parameters for what each variant means and Datasets for details on the dataset itself.

VariantSizeworldeuropeafricausajapan
📥 makevalid157384 KB
📥 s3_twkb_p311522 KB
📥 s4_twkb_p314368 KB
📥 s5_twkb_p317473 KB
📥 s6_twkb_p318358 KB
📥 s7_twkb_p320705 KB
📥 s8_twkb_p328446 KB
📥 s3_wkb29437 KB
📥 s4_wkb49922 KB
📥 s5_wkb67690 KB
📥 s6_wkb72953 KB
📥 s7_wkb89964 KB
📥 s8_wkb135143 KB

geoBoundariesCGAZ_ADM2

City-level administrative boundaries sourced from geoBoundaries (Attribution required).

See Parameters for what each variant means and Datasets for details on the dataset itself.

VariantSizeworldeuropeafricausajapan
📥 makevalid266186 KB
📥 s3_twkb_p342856 KB
📥 s4_twkb_p315691 KB
📥 s5_twkb_p316420 KB
📥 s6_twkb_p325751 KB
📥 s7_twkb_p337814 KB
📥 s8_twkb_p344625 KB
📥 s3_wkb232214 KB
📥 s4_wkb54140 KB
📥 s5_wkb52469 KB
📥 s6_wkb128806 KB
📥 s7_wkb208105 KB
📥 s8_wkb246050 KB

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Code and tools distributed under the MIT License. The license of the datasets follows the license of the sources used to generate them. See LICENSE.md for more information.

Acknowledgements

About

Small geographic datasets based on open data + tools

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages