docs: function parseGridData(data, getPosition, getWeight = null) {
    const pointCount = count(data);
    const positions = new Float32Array(pointCount * 2);
    const positions64xyLow = new Float32Array(pointCount * 2);
    const weightValues = new Float32Array(pointCount * 3);
  
    let yMin = Infinity;
    let yMax = -Infinity;
    let xMin = Infinity;
    let xMax = -Infinity;
    let y;
    let x;
    const {iterable, objectInfo} = createIterable(data);
    for (const object of iterable) {
      objectInfo.index++;
      const position = getPosition(object, objectInfo);
      const {index} = objectInfo;
      x = position[0];
      y = position[1];
      positions[index * 2] = x;
      positions[index * 2 + 1] = y;
  
      positions64xyLow[index * 2] = fp64LowPart(x);
      positions64xyLow[index * 2 + 1] = fp64LowPart(y);
  
      const weight = getWeight ? getWeight(object, objectInfo) : DEFAULT_WEIGHT;
      // Aggregator expects each weight is an array of size 3
      if (Array.isArray(weight)) {
        weightValues[index * 3] = weight[0];
        weightValues[index * 3 + 1] = weight[1];
        weightValues[index * 3 + 2] = weight[2];
      } else {
        // backward compitability
        weightValues[index * 3] = weight;
      }
  
      if (Number.isFinite(y) && Number.isFinite(x)) {
        yMin = y < yMin ? y : yMin;
        yMax = y > yMax ? y : yMax;
  
        xMin = x < xMin ? x : xMin;
        xMax = x > xMax ? x : xMax;
      }
    }
    const weights = {
      weight1: {
        size: 1,
        operation: AGGREGATION_OPERATION.SUM,
        needMax: true,
        values: weightValues
      }
    };
    const boundingBox = {xMin, xMax, yMin, yMax};
    return {
      positions,
      positions64xyLow,
      weights,
      boundingBox
    };
  }