docs: function encode(geom) {
    let type = geom.getType();
    const geometryEncoder = GeometryEncoder[type];
    const enc = geometryEncoder(geom);
    type = type.toUpperCase();
    if (typeof /** @type {?} */ (geom).getFlatCoordinates === 'function') {
      const dimInfo = encodeGeometryLayout(/** @type {import("../geom/SimpleGeometry.js").default} */ (geom));
      if (dimInfo.length > 0) {
        type += ' ' + dimInfo;
      }
    }
    if (enc.length === 0) {
      return type + ' ' + EMPTY;
    }
    return type + '(' + enc + ')';
  }