addGeometry_(geometry, feature) {
    const type = geometry.getType();
    switch (type) {
      case 'GeometryCollection': {
        const geometries =
          /** @type {import("../../geom.js").GeometryCollection} */ (
            geometry
          ).getGeometriesArray();
        for (const geometry of geometries) {
          this.addGeometry_(geometry, feature);
        }
        break;
      }
      case 'MultiPolygon': {
        const multiPolygonGeom =
          /** @type {import("../../geom.js").MultiPolygon} */ (geometry);
        this.addCoordinates_(
          type,
          multiPolygonGeom.getFlatCoordinates(),
          multiPolygonGeom.getEndss(),
          feature,
          getUid(feature),
          multiPolygonGeom.getStride(),
        );
        break;
      }
      case 'MultiLineString': {
        const multiLineGeom =
          /** @type {import("../../geom.js").MultiLineString|RenderFeature} */ (
            geometry
          );
        this.addCoordinates_(
          type,
          multiLineGeom.getFlatCoordinates(),
          multiLineGeom.getEnds(),
          feature,
          getUid(feature),
          multiLineGeom.getStride(),
        );
        break;
      }
      case 'MultiPoint': {
        const multiPointGeom =
          /** @type {import("../../geom.js").MultiPoint|RenderFeature} */ (
            geometry
          );
        this.addCoordinates_(
          type,
          multiPointGeom.getFlatCoordinates(),
          null,
          feature,
          getUid(feature),
          multiPointGeom.getStride(),
        );
        break;
      }
      case 'Polygon': {
        const polygonGeom =
          /** @type {import("../../geom.js").Polygon|RenderFeature} */ (
            geometry
          );
        this.addCoordinates_(
          type,
          polygonGeom.getFlatCoordinates(),
          polygonGeom.getEnds(),
          feature,
          getUid(feature),
          polygonGeom.getStride(),
        );
        break;
      }
      case 'Point': {
        const pointGeom = /** @type {import("../../geom.js").Point} */ (
          geometry
        );
        this.addCoordinates_(
          type,
          pointGeom.getFlatCoordinates(),
          null,
          feature,
          getUid(feature),
          pointGeom.getStride(),
        );
        break;
      }
      case 'LineString':
      case 'LinearRing': {
        const lineGeom = /** @type {import("../../geom.js").LineString} */ (
          geometry
        );

        const stride = lineGeom.getStride();

        this.addCoordinates_(
          type,
          lineGeom.getFlatCoordinates(),
          null,
          feature,
          getUid(feature),
          stride,
          lineGeom.getLayout?.(),
        );
        break;
      }
      default:
      // pass
    }
  }
@param {import("../../geom.js").Geometry|RenderFeature} geometry Geometry
@param {Feature|RenderFeature} feature Feature
@private