length3D method
Returns the length of this geometry calculated in a cartesian 3D space.
For points the result is 0.0
, for line strings the length of a line, for
polygons the perimeter of an area. Multi geometries and geometry
collections returns the sum of lengths of contained geometries.
To calculate (2D) lengths along the surface of the earth, see spherical
extensions for Iterable<Geographic>
and PositionSeries
implemented by
the package:geobase/geodesy.dart
library.
See also length2D.
Implementation
@override
double length3D() {
var length = 0.0;
for (final chain in chains) {
length += chain.length3D();
}
return length;
}