[][src]Crate tidwall_geohash

Modules

base32

Structs

Box

Box represents a rectangle in latitude/longitude space.

Constants

EAST
NORTH

Cardinal and intercardinal directions

NORTH_EAST
NORTH_WEST
SOUTH
SOUTH_EAST
SOUTH_WEST
WEST

Functions

bounding_box

bounding_box returns the region encoded by the given string geohash.

bounding_box_int

bounding_box_int returns the region encoded by the given 64-bit integer geohash.

bounding_box_int_with_precision

bounding_box_int_with_precision returns the region encoded by the integer geohash with the specified precision.

decode

decode the string geohash to a (lat, lng) point.

decode_center

decode_center decodes the string geohash to the central point (lat, lng) of the bounding box.

decode_int

decode_int_with_precision decodes the provided 64-bit integer geohash to a (lat, lng) point.

decode_int_with_precision

decode_int_with_precision decodes the provided integer geohash with bits of precision to a (lat, lng) point.

encode

Encode the point (lat, lng) as a string geohash with the standard 12 characters of precision.

encode_int

encode_int encodes the point (lat, lng) to a 64-bit integer geohash.

encode_int_with_precision

encode_int_with_precision encodes the point (lat, lng) to an integer with the specified number of bits.

encode_with_precision

encode_with_precision encodes the point (lat, lng) as a string geohash with the specified number of characters of precision (max 12).

error_with_precision

error_with_precision returns the error range in latitude and longitude for in integer geohash with bits of precision. (lat_err, lng_err)

neighbor

neighbor returns a geohash string that corresponds to the provided geohash's neighbor in the provided direction

neighbor_int

neighbor_int returns a uint64 that corresponds to the provided hash's neighbor in the provided direction at 64-bit precision.

neighbor_int_with_precision

neighbor_int_with_precision returns a uint64s that corresponds to the provided hash's neighbor in the provided direction at the given precision.

neighbors

neighbors returns a slice of geohash strings that correspond to the provided geohash's neighbors.

neighbors_int

neighbors_int returns a slice of uint64s that correspond to the provided hash's neighbors at 64-bit precision.

neighbors_int_with_precision

neighbors_int_with_precision returns a slice of uint64s that correspond to the provided hash's neighbors at the given precision.

validate

Validavalidatete the string geohash.

Type Definitions

Direction

Crate geohash provides encoding and decoding of string and integer geohashes. Direction represents directions in the latitute/longitude space.