@Override
  public long estimateMemoryUsageBytes() {
    long size = 0;
    size += waysInMultipolygon == null ? 0 : waysInMultipolygon.serializedSizeInBytes();
    // multipolygonWayGeometries is reported separately
    size += estimateSize(wayToRelations);
    size += estimateSize(relationInfo);
    size += estimateSize(roleIdsReverse);
    size += estimateSize(roleIds);
    size += roleSizes.get();
    size += relationInfoSizes.get();
    return size;
  }
Estimates the resource requirements for a multipolygon geometry multimap for a given OSM input file.
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/osm/OsmReader.java