pub trait RhumbLength<T, RHS = Self> {
// Required method
fn rhumb_length(&self) -> T;
}
👎Deprecated since 0.29.0: Please use the
line.length::<Rhumb>()
via the Length
trait instead.Expand description
Determine the length of a geometry assuming each segment is a rhumb line.
Note: this implementation uses a mean earth radius of 6371.088 km, based on the recommendation of the IUGG
Required Methods§
Sourcefn rhumb_length(&self) -> T
👎Deprecated since 0.29.0: Please use the line.length::<Rhumb>()
via the Length
trait instead.
fn rhumb_length(&self) -> T
line.length::<Rhumb>()
via the Length
trait instead.Determine the length of a geometry assuming each segment is a rhumb line.
§Units
- return value: meters
§Examples
use geo::prelude::*;
use geo::LineString;
let linestring = LineString::<f64>::from(vec![
// New York City
(-74.006, 40.7128),
// London
(-0.1278, 51.5074),
]);
let length = linestring.rhumb_length();
assert_eq!(
5_794_129., // meters
length.round()
);