pub struct LoraPoint {
pub x: f64,
pub y: f64,
pub z: Option<f64>,
pub srid: u32,
}Expand description
A 2D or 3D point, either Cartesian or WGS-84 Geographic.
SRID distinguishes coordinate systems:
- SRID 7203: Cartesian 2D
- SRID 9157: Cartesian 3D
- SRID 4326: WGS-84 Geographic 2D
- SRID 4979: WGS-84 Geographic 3D
z is Some iff the point is 3D. For geographic 3D points z holds
the height in metres.
Fields§
§x: f64First coordinate: x (Cartesian) or longitude (Geographic)
y: f64Second coordinate: y (Cartesian) or latitude (Geographic)
z: Option<f64>Third coordinate: z (Cartesian) or height in metres (Geographic).
None for 2D points.
srid: u32Spatial Reference ID.
Implementations§
Source§impl LoraPoint
impl LoraPoint
pub fn cartesian(x: f64, y: f64) -> Self
pub fn cartesian_3d(x: f64, y: f64, z: f64) -> Self
pub fn geographic(longitude: f64, latitude: f64) -> Self
pub fn geographic_3d(longitude: f64, latitude: f64, height: f64) -> Self
Sourcepub fn is_geographic(&self) -> bool
pub fn is_geographic(&self) -> bool
True for WGS-84 points (2D or 3D).
Trait Implementations§
impl Eq for LoraPoint
Auto Trait Implementations§
impl Freeze for LoraPoint
impl RefUnwindSafe for LoraPoint
impl Send for LoraPoint
impl Sync for LoraPoint
impl Unpin for LoraPoint
impl UnsafeUnpin for LoraPoint
impl UnwindSafe for LoraPoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more