private void renderLineOrPolygon(int zoom, Map<String, Object> attrs, FeatureCollector.Feature feature,
    Geometry geom) {
    boolean finished = false;
    boolean area = geom instanceof Polygonal;
    double minSize = feature.getMinPixelSizeAtZoom(zoom) / 256d;
    double buffer = feature.getBufferPixelsAtZoom(zoom) / 256;
    if (area) {
      // treat minPixelSize as the edge of a square that defines minimum area for features
      minSize *= minSize;
    }
    TileExtents.ForZoom extents = config.bounds().tileExtents().getForZoom(zoom);
    TiledGeometry sliced = null;
    List<List<CoordinateSequence>> groups = GeometryCoordinateSequences.extractGroups(geom, minSize);
    try {
      sliced = TiledGeometry.sliceIntoTiles(groups, buffer, area, zoom, extents);
    } catch (GeometryException e) {
      try {
        geom = GeoUtils.fixPolygon(geom);
        groups = GeometryCoordinateSequences.extractGroups(geom, minSize);
        sliced = TiledGeometry.sliceIntoTiles(groups, buffer, area, zoom, extents);
      } catch (GeometryException ex) {
        ex.log(stats, "slice_line_or_polygon", "Error slicing feature at z" + zoom + ": " + feature);
        // omit from this zoom level, but maybe the next will be better
        finished = true;
      }
    }
    if (!finished) {
      String numPointsAttr = feature.getNumPointsAttr();
      if (numPointsAttr != null) {
        // if profile wants the original number off points that the simplified but untiled geometry started with
        attrs = new HashMap<>(attrs);
        attrs.put(numPointsAttr, geom.getNumPoints());
      }
      writeTileFeatures(zoom, feature.getId(), feature, sliced, attrs);
    }

    stats.processedElement(area ? "polygon" : "line", feature.getLayer(), zoom);
  }
Constructs a new feature render that will send rendered features to {@code consumer}.
planetiler-core/src/main/java/com/onthegomap/planetiler/render/FeatureRenderer.java