void accept(Geometry geometry) {
      switch (geometry) {
        case MultiLineString multiLineString -> {
          for (int i = 0; i < multiLineString.getNumGeometries(); i++) {
            encode(((LineString) multiLineString.getGeometryN(i)).getCoordinateSequence(), false, GeometryType.LINE);
          }
        }
        case Polygon polygon -> {
          LineString exteriorRing = polygon.getExteriorRing();
          encode(exteriorRing.getCoordinateSequence(), true, GeometryType.POLYGON);
          for (int i = 0; i < polygon.getNumInteriorRing(); i++) {
            LineString interiorRing = polygon.getInteriorRingN(i);
            encode(interiorRing.getCoordinateSequence(), true, GeometryType.LINE);
          }
        }
        case MultiPolygon multiPolygon -> {
          for (int i = 0; i < multiPolygon.getNumGeometries(); i++) {
            accept(multiPolygon.getGeometryN(i));
          }
        }
        case LineString lineString ->
          encode(lineString.getCoordinateSequence(), shouldClosePath(geometry), GeometryType.LINE);
        case Point point -> encode(point.getCoordinateSequence(), false, GeometryType.POINT);
        case Puntal ignored -> encode(new CoordinateArraySequence(geometry.getCoordinates()), shouldClosePath(geometry),
          geometry instanceof MultiPoint, GeometryType.POINT);
        case null -> LOGGER.warn("Null geometry type");
        default -> LOGGER.warn("Unrecognized geometry type: " + geometry.getGeometryType());
      }
    }
Encodes a geometry as a sequence of integers according to the
<a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#43-geometry-encoding">Geometry * Encoding
Specification</a>.
planetiler-core/src/main/java/com/onthegomap/planetiler/VectorTile.java