pub struct MultiPartShapeM {
pub base: MultiPartShape,
pub m_range: (f64, f64),
pub m_values: Vec<f64>,
}Expand description
A multi-part shape with M (measure) values (PolyLineM, PolygonM, or MultiPointM)
Binary layout (after shape type):
- Box2D (32 bytes: x_min, y_min, x_max, y_max)
- num_parts (4 bytes)
- num_points (4 bytes)
- parts array (num_parts * 4 bytes)
- points array (num_points * 16 bytes: x, y pairs)
- m_range (16 bytes: m_min, m_max)
- m_values array (num_points * 8 bytes)
Fields§
§base: MultiPartShapeBase 2D shape data (bbox, parts, points)
m_range: (f64, f64)M value range (min, max)
m_values: Vec<f64>M values for each point
Implementations§
Source§impl MultiPartShapeM
impl MultiPartShapeM
Sourcepub fn new(
parts: Vec<i32>,
points: Vec<Point>,
m_values: Vec<f64>,
) -> Result<Self>
pub fn new( parts: Vec<i32>, points: Vec<Point>, m_values: Vec<f64>, ) -> Result<Self>
Creates a new multi-part shape with M values
Sourcepub fn read<R: Read>(reader: &mut R) -> Result<Self>
pub fn read<R: Read>(reader: &mut R) -> Result<Self>
Reads a multi-part shape with M from a reader
Sourcepub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
Writes a multi-part shape with M to a writer
Sourcepub fn content_length_words(&self) -> i32
pub fn content_length_words(&self) -> i32
Returns the content length in 16-bit words (excluding shape type)
Trait Implementations§
Source§impl Clone for MultiPartShapeM
impl Clone for MultiPartShapeM
Source§fn clone(&self) -> MultiPartShapeM
fn clone(&self) -> MultiPartShapeM
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiPartShapeM
impl Debug for MultiPartShapeM
Source§impl PartialEq for MultiPartShapeM
impl PartialEq for MultiPartShapeM
impl StructuralPartialEq for MultiPartShapeM
Auto Trait Implementations§
impl Freeze for MultiPartShapeM
impl RefUnwindSafe for MultiPartShapeM
impl Send for MultiPartShapeM
impl Sync for MultiPartShapeM
impl Unpin for MultiPartShapeM
impl UnsafeUnpin for MultiPartShapeM
impl UnwindSafe for MultiPartShapeM
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