code: function writePolygonGeometry_(geometry) {
    if (geometry instanceof olGeomPolygon) {
      const flatCoordinates = geometry.getFlatCoordinates();
      const stride = geometry.getStride();
      const ends = geometry.getEnds();
      const offset = 0;
      const textArray = ['a('];
      encodeRings_.call(this,
        flatCoordinates, stride, offset, ends, textArray);
      textArray.push(')');
      return textArray.join('');
    }
    return null;
  }
docs: Encode an {@link import("ol/geom/Polygon.js").default} geometry into a logical sequence
  of characters.
  @param {Geometry} geometry Geometry.
  @return {?string} Encoded geometry.
  @private
  @hidden
  @this {FeatureHash}