public static LineString getLongestLine(MultiLineString multiLineString) {
    LineString result = null;
    double max = -1;
    for (int i = 0; i < multiLineString.getNumGeometries(); i++) {
      if (multiLineString.getGeometryN(i) instanceof LineString ls) {
        double length = ls.getLength();
        if (length > max) {
          max = length;
          result = ls;
        }
      }
    }
    return result;
  }
For a feature of size {@code worldGeometrySize} (where 1=full planet), determine the minimum zoom level at which
the feature appears at least {@code minPixelSize} pixels large.
<p>
The result will be clamped to the range [0, {@link PlanetilerConfig#MAX_MAXZOOM}].
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/GeoUtils.java