public static Collection<List<VectorTile.Feature>> groupByAttrs(
    List<VectorTile.Feature> features,
    List<VectorTile.Feature> others,
    GeometryType geometryType
  ) {
    LinkedHashMap<Map<String, Object>, List<VectorTile.Feature>> groupedByAttrs = new LinkedHashMap<>();
    for (VectorTile.Feature feature : features) {
      if (feature == null) {
        // ignore
      } else if (feature.geometry().geomType() != geometryType) {
        // just ignore and pass through non-polygon features
        others.add(feature);
      } else {
        groupedByAttrs
          .computeIfAbsent(feature.tags(), k -> new ArrayList<>())
          .add(feature);
      }
    }
    return groupedByAttrs.values();
  }
Returns each group of vector tile features that share the exact same attributes.

@param features     the set of input features
@param others       list to add any feature that does not match {@code geometryType}
@param geometryType the type of geometries to return in the result
@return all the elements from {@code features} of type {@code geometryType} grouped by attributes
planetiler-core/src/main/java/com/onthegomap/planetiler/FeatureMerge.java