pub struct PrimitiveBlock {
pub primitive_groups: Vec<PrimitiveGroup>,
pub granularity: i32,
pub lat_offset: i64,
pub lon_offset: i64,
pub date_granularity: i32,
/* private fields */
}Expand description
NOTE: currently relations are stored, but we don’t wait for the Block to store all relations before we start testing primtiveHandle against the data. This is a problem because relations reference eachother at times, and we need to be able to resolve those references before we can run relationHandle against the data. This isn’t an important issue since in practice, all relations that reference eachother often produce garbage or unusable data. But it would be nice to fix this. Morbidly enough, the “BEST” solution is to treat relations like we do nodes and ways since relations could possibly reference eachother outside their own block. From a practical standpoint, I can’t see this being worth the effort or memory/time cost.
Fields§
§primitive_groups: Vec<PrimitiveGroup>Primitive groups are smaller collections of the nodes, ways and relations
granularity: i32Granularity, units of nanodegrees, used to store coordinates in this block.
lat_offset: i64Offset value between the output coordinates and the granularity grid in units of nanodegrees.
lon_offset: i64Offset value between the output coordinates and the granularity grid in units of nanodegrees.
date_granularity: i32Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
Implementations§
Source§impl PrimitiveBlock
impl PrimitiveBlock
Sourcepub fn get_string(&self, index: usize) -> &str
pub fn get_string(&self, index: usize) -> &str
Get a string from the string table
Get a record of strings from the string table
Trait Implementations§
Source§impl Debug for PrimitiveBlock
impl Debug for PrimitiveBlock
Source§impl Default for PrimitiveBlock
impl Default for PrimitiveBlock
Source§impl ProtoRead for PrimitiveBlock
Read in the contents of the primitive block
impl ProtoRead for PrimitiveBlock
Read in the contents of the primitive block
Auto Trait Implementations§
impl Freeze for PrimitiveBlock
impl RefUnwindSafe for PrimitiveBlock
impl Send for PrimitiveBlock
impl Sync for PrimitiveBlock
impl Unpin for PrimitiveBlock
impl UnwindSafe for PrimitiveBlock
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().