/qk

fast geographic quadtree indexer for Rust

Primary LanguageRustMIT LicenseMIT

qk

qk is a fast geographic quadtree indexer for Rust

Test

cargo test --lib

Format

cargo fmt

Types

Geometry types use geo_types whenever available. Additional structs are exposed for types unique to qk, such as the Tile struct.

API

Tile

An X,Y,Z tile struct.

Point

A point geo_types coordinate.

Rect

A bounded rectangle geometry, also known as a bounding box or bbox.

point_to_quadkey

Converts a lon,lat point to a quadkey index.

point_to_tile

Converts a lon,lat point to an X,Y,Z tile.

point_to_tile_fraction

Converts a lon,lat point to a fractional X,Y,Z tile.

quadkey_to_tile

Converts a quadkey index string to an X,Y,Z tile.

tile_to_quadkey

Converts an X,Y,Z tile to a quadkey index string.

tile_to_rect

Converts an X,Y,Z tile to a bounding box Rect.

quadkey_to_rect

Converts a quadkey index string to a bounding box Rect.

point_to_rect

Converts a lon,lat point to a bounding box Rect.

Inspiration