Repository navigation
feat(layers): aggregate custom projections in common space - #10743
Conversation
|
b325aa0 to
d185f05
Compare
d185f05 to
8aff8a2
Compare
8aff8a2 to
fe708cb
Compare
fe708cb to
2975da2
Compare
758fa0b to
996e5f4
Compare
996e5f4 to
900472b
Compare
ibgreen
left a comment
There was a problem hiding this comment.
Thanks Xiaoji, this is a useful step toward supporting non-Web-Mercator datasets throughout deck.gl. Aggregating in the projected plane and keeping generated geometry in that space is the right direction.
Approving the overall direction, with two remaining correctness issues recorded inline: preserving Cartesian layer transforms and making meter-sized bin definitions independent of the camera center. Please address these as this stack progresses.
For the API, please document whether cellSize/radius represent map meters or locally approximated ground meters, and where that approximation is evaluated. Reusable projection-scale calculations could naturally live in math.gl; aggregation lifecycle, GPU precision viewports, and sublayer construction belong in deck.gl.
Reviewed statically at 900472b; tests were not run.
900472b to
03e6c48
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0831dfe. Configure here.

For #10739 (PR 4 of 6)
Make aggregation layers operate on preprojected positions in custom projection views.
Changed list
Note
Medium Risk
Touches CPU/GPU binning, bounds, and projection uniforms across all major aggregation layers; regressions would show as misaligned bins or heatmaps on custom projections and some transform/modelMatrix cases.
Overview
Adds common-space aggregation for experimental custom projection views so Contour, Grid, Hexagon, Heatmap, and ScreenGrid bin and render using preprojected map-meter positions, matching equivalent Cartesian data on CPU and GPU.
AggregationLayer gains shared projection helpers (
projectPositionFromAttribute, bounds handling for Cartesian transforms, GPUprojectuniform overrides) and a dedicatedcreateAggregationViewportfor stable GPU binning. Per-layer updates wire position attribute transforms, anchor bin sizes withgetDistanceScalesat data-center, fix heatmap/screen-grid bounds and texture math underpreproject, and adjust contour sublayer matrices for custom geospatial projection.Core/API:
CustomProjectionViewport.getDistanceScales(coordinateOrigin?)evaluates ground-meter scales at a fixed map-meter anchor;Layer.projectPositionaccepts overrides includingmodelMatrix: null; docs and release notes describe approximated ground meters forcellSize/radiusand list aggregation layers as supported.Tests: large vitest suite for parity across backends/transforms/panning, deterministic
projectionGridfixture, and conic-projection render goldens for contour/hexagon/heatmap.Reviewed by Cursor Bugbot for commit e99db77. Bugbot is set up for automated code reviews on this repo. Configure here.