pub struct GeometryModel(/* private fields */);Expand description
model for link geometries by edge id. can be constructed either
from edge geometry dataset (GeometryModel::new_from_edges) or
from the vertices (GeometryModel::new_from_vertices) by simply
drawing lines between coordinates.
Implementations§
Source§impl GeometryModel
impl GeometryModel
Sourcepub fn new_from_vertices(
graph: Arc<Graph>,
edge_list_id: EdgeListId,
) -> Result<GeometryModel, MapError>
pub fn new_from_vertices( graph: Arc<Graph>, edge_list_id: EdgeListId, ) -> Result<GeometryModel, MapError>
with no provided geometries, create minimal LineStrings from pairs of vertex Points
Sourcepub fn new_from_edges(
geometry_input_file: &String,
edge_list_id: EdgeListId,
graph: Arc<Graph>,
) -> Result<GeometryModel, MapError>
pub fn new_from_edges( geometry_input_file: &String, edge_list_id: EdgeListId, graph: Arc<Graph>, ) -> Result<GeometryModel, MapError>
use a user-provided enumerated textfile input to load LineString geometries
Sourcepub fn geometries<'a>(
&'a self,
) -> Box<dyn Iterator<Item = &'a LineString<f32>> + 'a>
pub fn geometries<'a>( &'a self, ) -> Box<dyn Iterator<Item = &'a LineString<f32>> + 'a>
iterate through the geometries of this model
Auto Trait Implementations§
impl Freeze for GeometryModel
impl RefUnwindSafe for GeometryModel
impl Send for GeometryModel
impl Sync for GeometryModel
impl Unpin for GeometryModel
impl UnsafeUnpin for GeometryModel
impl UnwindSafe for GeometryModel
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
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>
Converts
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>
Converts
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 more