Struct h3o::geom::MultiLineString
source · pub struct MultiLineString(/* private fields */);
Expand description
A collection of geo::LineString
.
Note that the ToCells
implementation suffers from the same limitation
that grid_path_cells
, which means that on
error max_cells_count
returns 0 and to_cells
an empty iterator.
Implementations§
source§impl MultiLineString
impl MultiLineString
sourcepub fn from_radians(
lines: MultiLineString<f64>
) -> Result<Self, InvalidGeometry>
pub fn from_radians( lines: MultiLineString<f64> ) -> Result<Self, InvalidGeometry>
Initialize a collection of lines from lines whose coordinates are in radians.
§Errors
InvalidGeometry
if one of the line is invalid (e.g. contains
non-finite coordinates).
§Example
use geo::line_string;
use h3o::geom::MultiLineString;
let line_string: geo::LineString<f64> = line_string![
(x: 1.996408325715777, y: 0.534292570530397),
(x: 2.208424012168513, y: 0.7995167582816788),
(x: 2.1213562369319434, y: 0.5449632604075227),
];
let lines = geo::MultiLineString::new(vec![line_string]);
let lines = MultiLineString::from_radians(lines)?;
sourcepub fn from_degrees(
lines: MultiLineString<f64>
) -> Result<Self, InvalidGeometry>
pub fn from_degrees( lines: MultiLineString<f64> ) -> Result<Self, InvalidGeometry>
Initialize a collection of lines from lines whose coordinates are in degrees.
§Errors
InvalidGeometry
if one of the line is invalid (e.g. contains
non-finite coordinates).
§Example
use geo::line_string;
use h3o::geom::MultiLineString;
let line_string: geo::LineString<f64> = line_string![
(x: 114.385771248293, y: 30.612709316587612),
(x: 126.53337527260373, y: 45.8089358995214),
(x: 121.54475921995464, y: 31.22409481103989),
];
let lines = geo::MultiLineString::new(vec![line_string]);
let lines = MultiLineString::from_degrees(lines)?;
Trait Implementations§
source§impl Clone for MultiLineString
impl Clone for MultiLineString
source§fn clone(&self) -> MultiLineString
fn clone(&self) -> MultiLineString
Returns a copy 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 MultiLineString
impl Debug for MultiLineString
source§impl From<MultiLineString> for MultiLineString<f64>
impl From<MultiLineString> for MultiLineString<f64>
source§fn from(value: MultiLineString) -> Self
fn from(value: MultiLineString) -> Self
Converts to this type from the input type.
source§impl PartialEq for MultiLineString
impl PartialEq for MultiLineString
source§fn eq(&self, other: &MultiLineString) -> bool
fn eq(&self, other: &MultiLineString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToCells for MultiLineString
impl ToCells for MultiLineString
source§fn max_cells_count(&self, config: PolyfillConfig) -> usize
fn max_cells_count(&self, config: PolyfillConfig) -> usize
Returns an upper bound to the number of cells returned by
to_cells
. Read moreimpl StructuralPartialEq for MultiLineString
Auto Trait Implementations§
impl Freeze for MultiLineString
impl RefUnwindSafe for MultiLineString
impl Send for MultiLineString
impl Sync for MultiLineString
impl Unpin for MultiLineString
impl UnwindSafe for MultiLineString
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