getLinearRing(index) {
    if (index < 0 || this.ends_.length <= index) {
      return null;
    }
    return new LinearRing(
      this.flatCoordinates.slice(
        index === 0 ? 0 : this.ends_[index - 1],
        this.ends_[index],
      ),
      this.layout,
    );
  }
Return the Nth linear ring of the polygon geometry. Return `null` if the
given index is out of range.
The exterior linear ring is available at index `0` and the interior rings
at index `1` and beyond.

@param {number} index Index.
@return {LinearRing|null} Linear ring.
@api