function appendTraceTarget(coordinate, coordinates, ring, targets) {
  const x = coordinate[0];
  const y = coordinate[1];
  for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {
    const start = coordinates[i];
    const end = coordinates[i + 1];
    const rel = getPointSegmentRelationship(x, y, start, end);
    if (rel.squaredDistance === 0) {
      const index = i + rel.along;
      targets.push({
        coordinates: coordinates,
        ring: ring,
        startIndex: index,
        endIndex: index,
      });
      return;
    }
  }
}
@param {import("../coordinate.js").Coordinate} coordinate The clicked coordinate.
@param {Array<import("../coordinate.js").Coordinate>} coordinates The geometry component coordinates.
@param {boolean} ring The coordinates represent a linear ring.
@param {Array<TraceTarget>} targets The trace targets.