Repository navigation
map: point clouds, and Zarr dimensions set from the style panel - #1370
Merged
Merged
Conversation
Point clouds. LAS/LAZ/COPC/EPT load as a new `pointcloud` layer kind through maplibre-gl-lidar (deck.gl PointCloudLayer), one hidden control per layer so each cloud styles independently. COPC and EPT stream by viewport; LAS/LAZ <= 1.3 are read whole in the browser. LAS 1.4, a CRS only in GeoTIFF keys, or a CRS the user names (`options.crs`, typed into the style panel when the file has none) go through prepare.py's new `pointcloud` action: laspy rewrites the file as LAS 1.2 in lon/lat, thinned to 5M points and cached. The style panel colours by elevation/intensity/classification/RGB, toggles ASPRS classes, and sets point size, elevation filter, height offset and tilt. The bundle moves to deck.gl 9.4 (the lidar library needs it; rasters are unchanged) and ships laz-perf.wasm beside it instead of loading it from unpkg. Zarr. Every non-map dimension (time, band, depth...) gets a value list, previous/play/next and a slider in the style panel, which now opens when a layer is added or its card clicked. Fixed along the way: - multiscale pyramids (carbonplan/ndpyramid) failed to load - Zarr v3 stores without consolidated metadata failed; the page now lists the bucket (ListObjectsV2) and falls back to Python - string coordinates (band names) were unlabelled; picking a named dimension recomputes the automatic colour range for that slice only - placement is read from the coordinate arrays (descending latitude, 0..360 longitude, CF-attribute or WRF-style dimension names, projected grids via a new `crs` action that returns proj4 + lon/lat bounds) - an extension-less remote URL is probed for Zarr metadata before Python
…quieter point-cloud errors - zarrPlacement asks pyproj whether the store's declared CRS is geographic before trusting a lon/lat-sized coordinate range, so projected grids in km or cell indices are no longer pinned near 0,0. - inspect reports each variable's grid_mapping so unlistable stores can still open spatial_ref. - looksLikeZarr keeps the URL query (SAS/token) on every probed key. - A point-cloud loaderror after the load settled no longer rejects unhandled.
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, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bf2e999. Configure here.
…for Zarr placement
…wnload Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
iamsdas
approved these changes
Oct 5, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Point clouds: a new
pointcloudlayer kind for LAS / LAZ / COPC / EPT.maplibre-gl-lidar(deck.gl PointCloudLayer), one hidden control per layer so each cloud styles on its own.prepare.py's newpointcloudaction. laspy rewrites the file as LAS 1.2 in lon/lat, thinned to 5M points and cached. The user names a CRS withoptions.crs, entered in the style panel when the file has none.laz-perf.wasmnow ships beside the bundle instead of loading from unpkg.Zarr dimensions: every non-map dimension (time, band, depth…) gets a value list, previous/play/next buttons and a slider. The style panel now opens when a layer is added or its card clicked. Testing against real stores turned up bugs, fixed here:
crsaction returns proj4 and lon/lat bounds).Tested against
autzen-classified.copc.laz(10.6M points) andmadison.copc.laz, the USGSIA_FullStateEPT, PDALautzen_trim.lasandautzen.laz, plus local LAS 1.2 and 1.4 files.noaa-oisst-v2-monthly.zarrandstac-zarr/example.zarr(v3, unconsolidated), the carbonplan 4-Dtavg-prec-monthpyramid, the NEMOsos_abspyramid, and local v3, UTM and WRF-style stores.Tests
test_map_e2e.py: three new cases cover point clouds in the browser and through Python, the CRS box, and Zarr placement plus dimension controls. 11 pass.test_prepare.py: five new cases cover the converter, thinning, the CRS refusal and override, inspect/plan, and thecrsaction. 32 pass.tests/test_map_doc.pyandtests/test_map_runtime_contract.py: pass, with a new assertion that the vendored LAZ decoder is used.test_an_open_map_file_follows_agent_edits_and_writes_its_ownis flaky onmaintoo: it failed 2 of 6 runs without this change.Known limits
Note
Medium Risk
Large viewer and prepare.py changes (new conversion pipeline, Zarr placement) affect layer loading for multiple formats; mitigated by extensive new e2e and unit tests.
Overview
Adds point cloud layers (LAS/LAZ/COPC/EPT) end-to-end: new
pointcloudmap kind and style/options (color_scheme, class filters,options.crs), browser rendering viamaplibre-gl-lidar, and aprepare.pypointcloudaction that rewrites unsupported LAS (e.g. 1.4, missing CRS) to thinned LAS 1.2 in lon/lat with caching. MCP, discovery, and the style panel gain point-cloud controls (including CRS entry on failure).Zarr loading and the style panel are expanded: richer lat/lon axis detection, projected-grid placement via a new
crsaction, multiscale pyramids, remote listing for unconsolidated stores, per-dimension slice UI (slider, pick list, play), and auto-clim that follows named dimensions. Extension-less remote URLs can be probed as Zarr before calling Python.Azure blob SAS handling is normalized:
unsigned()strips SAS query params for cache keys, signing replaces stale tokens, and download resume matches sources across token rotation.Reviewed by Cursor Bugbot for commit 6f57182. Bugbot is set up for automated code reviews on this repo. Configure here.