public static ResourceUsage estimateNodeLocationUsage(LongLongMap.Type type, Storage storage, long osmFileSize,
    Path path) {
    long nodes = estimateNumNodes(osmFileSize);
    long maxNodeId = estimateMaxNodeId(osmFileSize);

    ResourceUsage check = new ResourceUsage("nodemap");

    return switch (type) {
      case NOOP -> check;
      case SPARSE_ARRAY -> check.addMemory(300_000_000L, "sparsearray node location in-memory index")
        .add(path, storage, 9 * nodes, "sparsearray node location cache");
      case SORTED_TABLE -> check.addMemory(300_000_000L, "sortedtable node location in-memory index")
        .add(path, storage, 12 * nodes, "sortedtable node location cache");
      case ARRAY -> check.add(path, storage, 8 * maxNodeId,
        "array node location cache (switch to sparsearray to reduce size)");
    };
  }
Estimates the resource requirements for a nodemap for a given OSM input file.
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/osm/OsmReader.java