pub trait DensifyHaversine<F: CoordFloat> {
    type Output;

    // Required method
    fn densify_haversine(&self, max_distance: F) -> Self::Output;
}
Expand description

Returns a new spherical geometry containing both existing and new interpolated coordinates with a maximum distance of max_distance between them.

Note: max_distance must be greater than 0.

§Units

max_distance: meters

§Examples

use geo::{coord, Line, LineString};
use geo::DensifyHaversine;

let line = Line::new(coord! {x: 0.0, y: 0.0}, coord! { x: 0.0, y: 1.0 });
// known output
let output: LineString = vec![[0.0, 0.0], [0.0, 0.5], [0.0, 1.0]].into();
// densify
let dense = line.densify_haversine(100000.0);
assert_eq!(dense, output);

Required Associated Types§

Required Methods§

source

fn densify_haversine(&self, max_distance: F) -> Self::Output

Implementors§