Trait BBoxQuantization

Source
pub trait BBoxQuantization {
    // Required methods
    fn quantize(&self) -> Vec<u8>;
    fn dequantize(buf: &[u8]) -> Self;
}
Expand description
Decimal PlacesApproximate Accuracy in Distance
0111 km (69 miles)
111.1 km (6.9 miles)
21.11 km (0.69 miles)
3111 meters (364 feet)
411.1 meters (36.4 feet)
51.11 meters (3.64 feet)
60.111 meters (11.1 cm or 4.39 inches)
71.11 cm (0.44 inches)
81.11 mm (0.044 inches)
24-bit quantization for longitude and latitude

LONGITUDE:

  • ~0.000021457672119140625 degrees precision
  • ~2.388 meters precision

LATITUDE:

  • ~0.000010728836059570312 degrees precision
  • ~1.194 meters precision

Required Methods§

Source

fn quantize(&self) -> Vec<u8>

Returns a quantized version of the BBox

Source

fn dequantize(buf: &[u8]) -> Self

Dequantize the BBox

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BBoxQuantization for BBOX

Source§

fn quantize(&self) -> Vec<u8>

Source§

fn dequantize(buf: &[u8]) -> Self

Source§

impl BBoxQuantization for BBox3D

Source§

fn quantize(&self) -> Vec<u8>

Source§

fn dequantize(buf: &[u8]) -> Self

Source§

impl BBoxQuantization for BBox

Source§

fn quantize(&self) -> Vec<u8>

Source§

fn dequantize(buf: &[u8]) -> BBox

Implementors§