@Override
      public Iterator<SortableFeature> iterator(int shard, int shards) {
        if (shard < 0 || shard >= shards) {
          throw new IllegalArgumentException("Bad shard params: shard=%d shards=%d".formatted(shard, shards));
        }
        return IntStream.range(0, list.size())
          .filter(d -> d % shards == shard)
          .mapToObj(list::get)
          .iterator();
      }
Returns a feature sorter that sorts all features in memory. Suitable for toy examples (unit tests).
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/FeatureSort.java