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:
- Finder: works anywhere.
- FuzzyFinder: blazing fast for most places on earth, use a preindex data. Not work for places around borders.
- DefaultFinder: combine both, if FuzzyFinder got no data, then use Finder.
Preprocessed timezone data is distributed via tzf-rel.
It’s Rust port of tzf and also the foundation of
tzfpy since v0.11.0
….
Structs
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.
Functions
deg2num is used to convert longitude, latitude to Slippy map tilenames
under specific zoom level.