private static Phase from(int number) {
      for (var phase : values()) {
        if (number == phase.number) {
          return phase;
        }
      }
      return number < 0 ? Phase.BEGIN : Phase.DONE;
    }
After finished processing all OSM elements
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/osm/OsmPhaser.java