public Polygon toPolygon() {
      return GeoUtils.JTS_FACTORY.createPolygon(
        geom.getExteriorRing(),
        holes.stream().map(ring -> ring.geom.getExteriorRing()).toArray(LinearRing[]::new)
      );
    }
A closed linestring that tracks parent and child rings relationships.
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/osm/OsmMultipolygon.java