common/src/main/java/org/apache/sedona/common/Functions.java [582:598]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static double length(Geometry geometry) {
    String geomType = geometry.getGeometryType();
    if (geomType.equalsIgnoreCase(Geometry.TYPENAME_LINESTRING)
        || geomType.equalsIgnoreCase(Geometry.TYPENAME_POINT)
        || geomType.equalsIgnoreCase(Geometry.TYPENAME_MULTIPOINT)
        || geomType.equalsIgnoreCase(Geometry.TYPENAME_MULTILINESTRING)) {
      return baseLength(geometry);
    } else if (geomType.equalsIgnoreCase(Geometry.TYPENAME_GEOMETRYCOLLECTION)) {
      double length = 0;
      for (int i = 0; i < geometry.getNumGeometries(); i++) {
        length += length(geometry.getGeometryN(i));
      }
      return length;
    } else {
      return 0;
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



common/src/main/java/org/apache/sedona/common/sphere/Spheroid.java [81:97]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static double length(Geometry geometry) {
    String geomType = geometry.getGeometryType();
    if (geomType.equalsIgnoreCase(Geometry.TYPENAME_LINESTRING)
        || geomType.equalsIgnoreCase(Geometry.TYPENAME_POINT)
        || geomType.equalsIgnoreCase(Geometry.TYPENAME_MULTIPOINT)
        || geomType.equalsIgnoreCase(Geometry.TYPENAME_MULTILINESTRING)) {
      return baseLength(geometry);
    } else if (geomType.equalsIgnoreCase(Geometry.TYPENAME_GEOMETRYCOLLECTION)) {
      double length = 0;
      for (int i = 0; i < geometry.getNumGeometries(); i++) {
        length += length(geometry.getGeometryN(i));
      }
      return length;
    } else {
      return 0;
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



