Quick Start Guide

This guide provides the basic steps to generate the timezone boundary data files after you have completed the Installation.

Running the Build Script

The main script, index.js, handles the entire process of downloading, building, and packaging the timezone data. Due to the memory-intensive nature of geometric processing, it's recommended to allocate more memory to the Node.js process.

To run the script and generate all timezone boundaries, execute the following command from the root of the project directory:

node --max-old-space-size=8192 index.js

This command will:

  1. Create downloads, working, cache, and dist directories if they don't exist.
  2. Download the required geographic boundaries from OpenStreetMap via the Overpass API.
  3. Process and assemble these boundaries into individual timezone polygons based on the rules in timezones.json.
  4. Perform validation checks to ensure there are no unexpected overlaps between timezone boundaries.
  5. Generate different variations of the data (e.g., with and without oceans, different timekeeping similarities).
  6. Output the final GeoJSON and Shapefile data into the ./dist directory.

The process can take a significant amount of time, especially on the first run, as it involves numerous downloads and complex computations.

Output Files

After the script completes successfully, you will find the generated release files in the ./dist directory. These files are ready for use and are the same ones published in the project's GitHub Releases.

For more advanced options, such as building only specific timezones or skipping certain steps, refer to the Usage Guide.