private void addShapeToResults(Map<TileCoord, List<CoordinateSequence>> inProgressShapes) {
    for (var entry : inProgressShapes.entrySet()) {
      TileCoord tileID = entry.getKey();
      List<CoordinateSequence> inSeqs = entry.getValue();
      if (area && inSeqs.getFirst().size() < 4) {
        // not enough points in outer polygon, ignore
        continue;
      }
      int minPoints = area ? 4 : 2;
      List<CoordinateSequence> outSeqs = inSeqs.stream()
        .filter(seq -> seq.size() >= minPoints)
        .toList();
      if (!outSeqs.isEmpty() && extents.test(tileID.x(), tileID.y())) {
        tileContents.computeIfAbsent(tileID, tile -> new ArrayList<>()).add(outSeqs);
      }
    }
  }
Slices a geometry into tiles and stores in member fields for a single "copy" of the world.
<p>
Instead of handling content outside -180 to 180 degrees longitude, return {@link Direction#LEFT} or
{@link Direction#RIGHT} to indicate whether this method should be called again with a different {@code xOffset} to
process wrapped content.

@param groups  the geometry
@param xOffset offset to apply to each X coordinate (-2^z handles content that wraps too far east and 2^z handles
               content that wraps too far west)
@return {@link Direction#LEFT} if there is more content to the west and {@link Direction#RIGHT} if there is more
        content to the east.
@throws GeometryException for a polygon that is invalid in a way that interferes with clipping
planetiler-core/src/main/java/com/onthegomap/planetiler/render/TiledGeometry.java