writeCircleGeometry_(feature, geometry) {
    const coordinates = geometry.getCenter();

    /** @type {SegmentData} */
    const centerSegmentData = {
      feature: feature,
      geometry: geometry,
      index: CIRCLE_CENTER_INDEX,
      segment: [coordinates, coordinates],
    };

    /** @type {SegmentData} */
    const circumferenceSegmentData = {
      feature: feature,
      geometry: geometry,
      index: CIRCLE_CIRCUMFERENCE_INDEX,
      segment: [coordinates, coordinates],
    };

    const featureSegments = [centerSegmentData, circumferenceSegmentData];
    centerSegmentData.featureSegments = featureSegments;
    circumferenceSegmentData.featureSegments = featureSegments;
    this.rBush_.insert(createExtent(coordinates), centerSegmentData);
    let circleGeometry = /** @type {import("../geom/Geometry.js").default} */ (
      geometry
    );
    const userProjection = getUserProjection();
    if (userProjection && this.getMap()) {
      const projection = this.getMap().getView().getProjection();
      circleGeometry = circleGeometry
        .clone()
        .transform(userProjection, projection);
      circleGeometry = fromCircle(
        /** @type {import("../geom/Circle.js").default} */ (circleGeometry)
      ).transform(projection, userProjection);
    }
    this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData);
  }
/**
   * We convert a circle into two segments.  The segment at index
   * {@link CIRCLE_CENTER_INDEX} is the
   * circle's center (a point).  The segment at index
   * {@link CIRCLE_CIRCUMFERENCE_INDEX} is
   * the circumference, and is not a line segment.
   *
   * @param {Feature} feature Feature.
   * @param {import("../geom/Circle.js").default} geometry Geometry.
   * @private
   */
We convert a circle into two segments.  The segment at index
CIRCLE_CENTER_INDEX is the
circle's center (a point).  The segment at index
CIRCLE_CIRCUMFERENCE_INDEX is
the circumference, and is not a line segment.

@param {Feature} feature Feature.
We convert a circle into two segments . The segment at index CIRCLE_CENTER_INDEX is the circle ' s center ( a point ) . The segment at index CIRCLE_CIRCUMFERENCE_INDEX is the circumference and is not a line segment . @param { Feature } feature Feature .
writeCircleGeometry_(feature, geometry) {
    const coordinates = geometry.getCenter();
    const centerSegmentData = {
      feature: feature,
      geometry: geometry,
      index: CIRCLE_CENTER_INDEX,
      segment: [coordinates, coordinates],
    };
    const circumferenceSegmentData = {
      feature: feature,
      geometry: geometry,
      index: CIRCLE_CIRCUMFERENCE_INDEX,
      segment: [coordinates, coordinates],
    };
    const featureSegments = [centerSegmentData, circumferenceSegmentData];
    centerSegmentData.featureSegments = featureSegments;
    circumferenceSegmentData.featureSegments = featureSegments;
    this.rBush_.insert(createExtent(coordinates), centerSegmentData);
    let circleGeometry =  (
      geometry
    );
    const userProjection = getUserProjection();
    if (userProjection && this.getMap()) {
      const projection = this.getMap().getView().getProjection();
      circleGeometry = circleGeometry
        .clone()
        .transform(userProjection, projection);
      circleGeometry = fromCircle(
         (circleGeometry)
      ).transform(projection, userProjection);
    }
    this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData);
  }
writeCircleGeometry_ ( feature , geometry ) { const coordinates = geometry . getCenter ( ) ; const centerSegmentData = { feature : feature , geometry : geometry , index : CIRCLE_CENTER_INDEX , segment : [ coordinates , coordinates ] , } ; const circumferenceSegmentData = { feature : feature , geometry : geometry , index : CIRCLE_CIRCUMFERENCE_INDEX , segment : [ coordinates , coordinates ] , } ; const featureSegments = [ centerSegmentData , circumferenceSegmentData ] ; centerSegmentData . featureSegments = featureSegments ; circumferenceSegmentData . featureSegments = featureSegments ; this . rBush_ . insert ( createExtent ( coordinates ) , centerSegmentData ) ; let circleGeometry = ( geometry ) ; const userProjection = getUserProjection ( ) ; if ( userProjection && this . getMap ( ) ) { const projection = this . getMap ( ) . getView ( ) . getProjection ( ) ; circleGeometry = circleGeometry . clone ( ) . transform ( userProjection , projection ) ; circleGeometry = fromCircle ( ( circleGeometry ) ) . transform ( projection , userProjection ) ; } this . rBush_ . insert ( circleGeometry . getExtent ( ) , circumferenceSegmentData ) ; }
We convert a circle into two segments.
We convert a circle into two segments .
/** @type {SegmentData} */ /** @type {SegmentData} */ /** @type {import("../geom/Geometry.js").default} */ /** @type {import("../geom/Circle.js").default} */