tinygpkg-data
Small, TWKB compressed, and simplified GeoPackage datasets to be used with tinygpkg.
Report Bug
·
Request Feature
Table of Contents
- About
- Datasets
- Featured Variants
- Parameters
- Variants
- Contributing
- License
- 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
Featured Variants
These are some selected useful variants of the datasets. See
Variants for the full list.
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.
| Name |
Simplify |
Min. Points |
Precision |
| makevalid |
none |
n/a |
full |
| s3_twkb_p3 |
1 |
20 |
3 |
| s4_twkb_p3 |
0.1 |
20 |
3 |
| s5_twkb_p3 |
0.01 |
20 |
3 |
| s6_twkb_p3 |
0.001 |
20 |
3 |
| s7_twkb_p3 |
0.0001 |
20 |
3 |
| s8_twkb_p3 |
0.00001 |
20 |
3 |
| s3_wkb |
1 |
20 |
full |
| s4_wkb |
0.1 |
20 |
full |
| s5_wkb |
0.01 |
20 |
full |
| s6_wkb |
0.001 |
20 |
full |
| s7_wkb |
0.0001 |
20 |
full |
| s8_wkb |
0.00001 |
20 |
full |
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.
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.
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.
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.
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.
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