Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ringsaturn/tzf-rel

Preprocessed timezone data
https://github.com/ringsaturn/tzf-rel

tzf

Last synced: 19 days ago
JSON representation

Preprocessed timezone data

Awesome Lists containing this project

README

        

# [tzf](https://github.com/ringsaturn/tzf)'s preprocessed timezone data

![](https://img.shields.io/github/v/release/ringsaturn/tzf-rel?style=plastic)

## Update Data Steps

### CI

Data build in [GitHub Actions](.github/workflows/ci.yml).

### Local build

1. Install CLI tool

```bash
# install tools
go install github.com/ringsaturn/tzf/cmd/geojson2tzpb@latest
go install github.com/ringsaturn/tzf/cmd/reducetzpb@latest
go install github.com/ringsaturn/tzf/cmd/compresstzpb@latest
go install github.com/ringsaturn/tzf/cmd/preindextzpb@latest
```

2. Set data version to build(Below steps need this environment var)

```bash
export TIMEZONE_BOUNDARY_VERSION=2023b
```

3. Download data

```bash
# download data
wget https://github.com/evansiroky/timezone-boundary-builder/releases/download/${TIMEZONE_BOUNDARY_VERSION}/timezones-with-oceans.geojson.zip
unzip timezones-with-oceans.geojson.zip
```

4. Make data

```bash
geojson2tzpb combined-with-oceans.json | xargs reducetzpb | xargs compresstzpb
preindextzpb combined-with-oceans.reduce.pb
```

## References

- Protocol Buffers define:

- Maintain tools
- [`checkboundaryrelease`](https://github.com/ringsaturn/tzf/tree/main/cmd/checkboundaryrelease)
- [`geojson2tzpb`](https://github.com/ringsaturn/tzf/tree/main/cmd/geojson2tzpb)
- [`reducetzpb`](https://github.com/ringsaturn/tzf/tree/main/cmd/reducetzpb)
- [`compresstzpb`](https://github.com/ringsaturn/tzf/tree/main/cmd/compresstzpb)
- [`preindextzpb`](https://github.com/ringsaturn/tzf/tree/main/cmd/preindextzpb)
- To view data in GeoJSON format(which is more convenient to show on map), see

- Data Usage examples
- Go:
- Rust: