///|
/// The path through `coords` (lng, lat pairs): its length (a ring's includes
/// the closing edge), the ring's area (counter-clockwise positive, 0 below three
/// vertices, NaN unless `closed`), then the distance to each vertex; meters.
pub fn Geodesic::measure_path(
self : Geodesic,
coords : ArrayView[Double],
closed : Bool,
) -> FixedArray[Double] {
let n = coords.length() / 2
let out = FixedArray::make(2 + n, 0.0)
let path = self.polygon(polyline=!closed)
for i in 0.. Array[Double]? {
let n = coords.length() / 2
guard step > 0.0 && n <= max_points else { return None }
let out = []
if n == 0 {
return Some(out)
}
let mut lon = coords[0]
out.push(lon)
out.push(coords[1])
for i in 1.. FixedArray[Double] {
let out = FixedArray::make((n + 1) * 2, 0.0)
for i in 0.. 0 {
out[n * 2] = out[0]
out[n * 2 + 1] = out[1]
}
out
}