(_ref)
| 61766 | var DEFAULT_WEIGHT = [1, 0, 0]; // Takes data and aggregation params and returns aggregated data. |
| 61767 | |
| 61768 | function pointToDensityGridData(_ref) { |
| 61769 | var data = _ref.data, |
| 61770 | getPosition = _ref.getPosition, |
| 61771 | cellSizeMeters = _ref.cellSizeMeters, |
| 61772 | gpuGridAggregator = _ref.gpuGridAggregator, |
| 61773 | gpuAggregation = _ref.gpuAggregation, |
| 61774 | aggregationFlags = _ref.aggregationFlags, |
| 61775 | getWeight = _ref.getWeight, |
| 61776 | _ref$fp = _ref.fp64, |
| 61777 | fp64 = _ref$fp === void 0 ? false : _ref$fp, |
| 61778 | _ref$coordinateSystem = _ref.coordinateSystem, |
| 61779 | coordinateSystem = _ref$coordinateSystem === void 0 ? _constants.COORDINATE_SYSTEM.LNGLAT : _ref$coordinateSystem, |
| 61780 | _ref$viewport = _ref.viewport, |
| 61781 | viewport = _ref$viewport === void 0 ? null : _ref$viewport, |
| 61782 | _ref$boundingBox = _ref.boundingBox, |
| 61783 | boundingBox = _ref$boundingBox === void 0 ? null : _ref$boundingBox; |
| 61784 | var gridData = {}; |
| 61785 | (0, _assert.default)(aggregationFlags.dataChanged || aggregationFlags.cellSizeChanged || aggregationFlags.viewportChanged); |
| 61786 | |
| 61787 | if (aggregationFlags.dataChanged) { |
| 61788 | gridData = parseGridData(data, getPosition, getWeight); |
| 61789 | boundingBox = gridData.boundingBox; |
| 61790 | } |
| 61791 | |
| 61792 | var cellSize = [cellSizeMeters, cellSizeMeters]; |
| 61793 | var worldOrigin = [0, 0]; |
| 61794 | (0, _assert.default)(coordinateSystem === _constants.COORDINATE_SYSTEM.LNGLAT || coordinateSystem === _constants.COORDINATE_SYSTEM.IDENTITY); |
| 61795 | |
| 61796 | switch (coordinateSystem) { |
| 61797 | case _constants.COORDINATE_SYSTEM.LNGLAT: |
| 61798 | case _constants.COORDINATE_SYSTEM.LNGLAT_DEPRECATED: |
| 61799 | var gridOffset = getGridOffset(boundingBox, cellSizeMeters); |
| 61800 | cellSize = [gridOffset.xOffset, gridOffset.yOffset]; |
| 61801 | worldOrigin = [-180, -90]; // Origin used to define grid cell boundaries |
| 61802 | |
| 61803 | break; |
| 61804 | |
| 61805 | case _constants.COORDINATE_SYSTEM.IDENTITY: |
| 61806 | var width = viewport.width, |
| 61807 | height = viewport.height; |
| 61808 | worldOrigin = [-width / 2, -height / 2]; // Origin used to define grid cell boundaries |
| 61809 | |
| 61810 | break; |
| 61811 | |
| 61812 | default: |
| 61813 | // Currently other coodinate systems not supported/verified. |
| 61814 | (0, _assert.default)(false); |
| 61815 | } |
| 61816 | |
| 61817 | var opts = getGPUAggregationParams({ |
| 61818 | boundingBox: boundingBox, |
| 61819 | cellSize: cellSize, |
| 61820 | worldOrigin: worldOrigin |
| 61821 | }); |
| 61822 | var aggregatedData = gpuGridAggregator.run({ |
| 61823 | positions: gridData.positions, |
| 61824 | positions64xyLow: gridData.positions64xyLow, |
| 61825 | weights: gridData.weights, |
nothing calls this directly
no test coverage detected