Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracker: COPC tiled loader #2911

Open
1 of 9 tasks
jo-chemla opened this issue Mar 11, 2024 · 3 comments
Open
1 of 9 tasks

Tracker: COPC tiled loader #2911

jo-chemla opened this issue Mar 11, 2024 · 3 comments

Comments

@jo-chemla
Copy link

jo-chemla commented Mar 11, 2024

  • COPC = Cloud Optimized PointCloud (basically the las/laz equivalent to COG for pointclouds instead of geotiffs)

Gradually adding support for COPC is a background effort in loaders.gl. It is partly aligned with a parallel effort to add PoTree 2.0 support.


  • Create new COPC module, with rough initial COPCSource implementation @ibgreen feat(copc): New module for COPC format #3030
  • Creeat a new Tile3DSource type interface and update COPCSource to implement it.
  • Update 3D Tile (pointcloud) rendering code to work with Tile3DSource instances such as COPCSource.
  • Create website example rendering a public COPC source.

Feedback (still WIP) on the COPC.js repo repo - CC @connormanning and hobu team.
P0/P1 asks

  • Drop cross-fetch dependency
    • Dependencies, especially node related ones, are causes for concern, bundle size issues, bundling complications with different bundlers etc.
    • All LTS versions of Node.js supports fetch natively now.
    • Big applications already have a fetch strategy and want to control fetching.
    • Recommend letting application supply its own fetch function rather than make the choice for it.
  • Update laz-perf dependency?.
    • Why 0.0.5 and not the latest, 0.0.6?

P2 asks - General recommendations (make the copc.js library more user and contributor friendly)

  • Replace "barrel exports" with cherry-picked exports.
  • Add TSDoc style comments
    • There is basically not a single comment in the code base
    • /** */ style comments on all exported types, functions, members are picked up by vscode "intellisense" and visible when hovering
  • base-hierarchy.ts seems to be at the core of the API, move it out of its hiding place in the utils folder.

Original ticket:

  • Following comment by @hobu here, it would be nice if loaders.gl could implement a COPC tiled loader.
  • Similar to how the OGC 3D Tiles loader works, with points coordinates being expressed in an arbitrary CRS (Coordinate Reference System) usually described by a proj4 string.
@connormanning
Copy link
Collaborator

For some additional info, copc.js provides what I'd call "primitives" for dealing with LAS/LAZ/COPC data: header/VLR parsing, hierarchy reading, fetching a COPC node slice (with API for fetching the laszip-compressed block, or decompressed to LAS, or providing a view with getters for each attribute including extra-bytes). Determining what to fetch, caching, running decompression in a web worker, etc, are left up to you.

See the PRs for COPC support in potree and itowns for examples of copc.js usage in the context of adding a COPC loader to a downstream rendering project.

@ibgreen
Copy link
Collaborator

ibgreen commented Mar 12, 2024

@connormanning I made a fleeting attempt at integrating your COPC code maybe 6 months ago but it had bundling issues as it was doing dynamic imports of node specific libraries (fs?) or some such.

Also loaders.gl has its own LASLoader module which is older and I would prefer to update that to align with the COPC LASLoader implementation but didn't immediately see how to separate the code in COPC.

By your description, sounds like your primitive system might be just what is needed to make your code fit into the loaders.gl model.

If we were able to pair up for an hour or so, perhaps we could make short work of it? email me if interested.

@misteryyy
Copy link

Hello guys,
have you mange to make some progress on this topic? @connormanning @ibgreen

@ibgreen ibgreen changed the title Implement a COPC tiled loader Tracker: COPC tiled loader Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants