Crate tzf_rs

source ·
Expand description

Fast timezone finder for Rust.

It’s designed for high performance geo queries related services like weather forecast API. And most queries could return in very limited time, averagely like 2000 nanoseconds.

Please note that this package use a simplified shape data so not so accurate around border.

There are there finders implements:

Preprocessed timezone data is distributed via tzf-rel.

It’s Rust port of tzf and also the foundation of tzfpy since v0.11.0….


It’s most recommend to use, combine both Finder and FuzzyFinder.
Finder use a fine tuned Ray casting algorithm implement geometry-rs which is Rust port of geometry by Josh Baker.
FuzzyFinder store all preindex’s tiles data in a HashMap, It iterate all zoom levels for input’s longitude and latitude to build map key to to check if in map.


deg2num is used to convert longitude, latitude to Slippy map tilenames under specific zoom level.