public double lengthMeters() throws GeometryException {
    return Double.isNaN(lengthMeters) ? (lengthMeters =
      (isPoint() || canBePolygon() || canBeLine()) ? GeoUtils.lengthInMeters(latLonGeometry()) : 0) : lengthMeters;
  }
Returns the approximate length of the geometry in meters.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/WithGeometry.java