private void compareGeometry(TileCoord coord, String layer, Geometry geom1, Geometry geom2) {
    String geometryType = geom1.getGeometryType();
    compareValues(coord, layer, "feature JTS geometry type", geom1.getGeometryType(), geom2.getGeometryType());
    compareValues(coord, layer, "feature num geometries", geom1.getNumGeometries(), geom2.getNumGeometries());
    if (geom1 instanceof MultiPolygon) {
      for (int i = 0; i < geom1.getNumGeometries() && i < geom2.getNumGeometries(); i++) {
        comparePolygon(coord, layer, geometryType, (Polygon) geom1.getGeometryN(i), (Polygon) geom2.getGeometryN(i));
      }
    } else if (geom1 instanceof Polygon p1 && geom2 instanceof Polygon p2) {
      comparePolygon(coord, layer, geometryType, p1, p2);
    }
  }
@throws FatalComparisonFailure if a comparison failure is encountered that prevents comparing the whole archives.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/CompareArchives.java