Repository navigation
feat(core): layer coordinateSystem supports arbitrary CRS - #10874
Conversation
[High impact] The changes reach deck.gl’s shared projection path across views and layer types. Fix the stale polygon transforms and the outstanding binary globe tile winding issue before merging. Findings
SummaryLayers can declare arbitrary source CRSs, with CPU conversion when the view cannot use those coordinates directly.
|
The typedef of CRS definition should at least include objects to support PROJJSON, a more modern description of CRS than the relatively fickle and outdated proj strings |
df1769d to
bbbcc9c
Compare
bbbcc9c to
b0c50dc
Compare
b0c50dc to
d747d88
Compare
d747d88 to
599ff79
Compare
ibgreen
left a comment
There was a problem hiding this comment.
Thanks for the substantial work on the CRS refactor. I’m requesting one correctness fix before approval: globe polygon triangulation still becomes invalid when a shader-side layer transform moves the polygon across the globe. The current code even documents this assumption, but modelMatrix and coordinateOrigin are public layer props and can change without rebuilding indices. Please make the temporary coordinates used for geocentric winding include the same transforms as rendering, and invalidate/retriangulate when those transforms change. A north-to-south move is a concrete case where triangles become inward-facing and disappear under back-face culling.
…en without preprojection
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 248a5e0. Configure here.

For #10739
Background
Major conceptual clean up of projection pipeline. Now explicitly separates:
For example, MVTLayer in v9.4 creates sublayers with
coordinateSystem: 'cartesian'in MapView andcoordinateSystem: 'lnglat'in GlobeView. After this PR, it creates sublayers withcoordinateSystem: 'OSMTile512'in all viewports.Antarctica,

coordinateSystem: 'EPSG:3031'(Stereographic) +GlobeViewFrance regions,

coordinateSystem: 'EPSG:2154'(Lambert-93) +MapViewSwitzerland cantons,

coordinateSystem: 'EPSG:2056'(LV95) +CustomProjectionView toCrs: 'EPSG:8857'(Equal Earth)Change List
Layer.coordinateSystemOSMTile512Note
High Risk
Breaking v10 changes across projection, layer initialization, multi-view filtering, and exported constants, with broad impact on aggregation, picking, and tiled layers.
Overview
Layers can declare data CRS with strings (EPSG/PROJ, legacy aliases like
'meter-offsets') instead of the removedCOORDINATE_SYSTEMexport. The layer manager resolves CRS asynchronously, blocks init/update until ready, and tracks source vs packed attribute CRS plus CPUpreproject/unpreprojectwhen the view shader cannot consume the source CRS directly.coordinateOriginapplies in source CRS before conversion for absolute CRSs.Projection pipeline refactor: viewport
getPreprojection(sourceCrs)replaces ad-hocpreprojectflags; shader uniformcoordinateSystem→coordinateFrame(identity/geodetic/projected/geocentric). Multi-view: first viewport allowed bylayerFilter(screen pass) seeds a layer’s projection context; draw activates viewport once per layer.resolutionsubdivision is earth-circumference–based (opt-in, including Globe); layers usegetSubdivisionStep(sourceCrs).Aggregation, tiles, picking: aggregation/custom-projection paths use
project.isCustomProjectionand layer preprojection state; hexagon pick addspositionin source CRS (nullable);PickingInfo.coordinatemay benull. MVT documents/uses tile-localOSMTile512; v10 examples switch to string coordinate systems.Docs/upgrade guide cover v10 viewport CRS, Globe
position, and migration from constants.Reviewed by Cursor Bugbot for commit 248a5e0. Bugbot is set up for automated code reviews on this repo. Configure here.