Boundaries of time zones fat-free.
The goal is to create a ready GeoJSON file with time zone boundaries in a simplified version to load as a layer on OSM maps.
Two wonderful repositories will help us to implement our project mapshaper and timezone-boundary-builder (many thanks to the authors for this work).
pnpm i
node index.js visvalingam 0.21%
- visvalingam is simplification. Mapshaper supports Douglas-Peucker (dp) simplification and two kinds of Visvalingam (visvalingam) simplification.
- 0.21% is percentage of removable points to retain. Accepts values in the range 0%-100% or 0-1
Result: output.geojson
You can see the result of the degreasing at http://geojson.io/ (copy the contents of the file output.geojson and paste it into the form).
The reduction in percentage of removable points is proportional to the reduction in area, so small island states or the Vatican, Monaco could be ignored. If this is important to you, set a larger percentage.
- https://github.com/evansiroky/timezone-boundary-builder - A tool to extract data from Open Street Map (OSM) to build the boundaries of the world's timezones.
- https://mapshaper.org/ - Simplification online tool.
- http://geojson.io/ - A quick, simple tool for creating, viewing, and sharing spatial data.
- https://bost.ocks.org/mike/simplify/ - Line Simplification.
- https://nominatim.openstreetmap.org/search?country=ukraine&polygon_geojson=1&format=geojson&polygon_threshold=0.1 - polygon_threshold