pub struct GraphBuilder { /* private fields */ }Expand description
Builder for constructing graphs from geospatial data
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
Sourcepub fn with_graph_type(graph_type: GraphType) -> Self
pub fn with_graph_type(graph_type: GraphType) -> Self
Create a new graph builder with specified type
Sourcepub fn with_tolerance(self, tolerance: f64) -> Self
pub fn with_tolerance(self, tolerance: f64) -> Self
Set the tolerance for coordinate snapping
Sourcepub fn add_linestring(
&mut self,
linestring: &LineString,
weight_fn: impl Fn(f64) -> f64,
) -> Result<Vec<EdgeId>>
pub fn add_linestring( &mut self, linestring: &LineString, weight_fn: impl Fn(f64) -> f64, ) -> Result<Vec<EdgeId>>
Add a linestring as edges in the graph
Sourcepub fn add_linestring_weighted(
&mut self,
linestring: &LineString,
weight_fn: impl Fn(f64) -> EdgeWeight,
) -> Result<Vec<EdgeId>>
pub fn add_linestring_weighted( &mut self, linestring: &LineString, weight_fn: impl Fn(f64) -> EdgeWeight, ) -> Result<Vec<EdgeId>>
Add a linestring with multi-criteria weights
Sourcepub fn build_validated(self) -> Result<Graph>
pub fn build_validated(self) -> Result<Graph>
Build and validate the graph
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnsafeUnpin for GraphBuilder
impl UnwindSafe for GraphBuilder
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