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

loading scalar field attributes in las files #2124

Closed
AccomplishedCode opened this issue Mar 25, 2022 · 5 comments
Closed

loading scalar field attributes in las files #2124

AccomplishedCode opened this issue Mar 25, 2022 · 5 comments

Comments

@AccomplishedCode
Copy link

I'm having trouble trying to access a scalar field I generated for a point cloud in the las format through loaders.gl. While accessing attributes, you get POINTS, COLORS_0, classification, intensity , but what if I created a new scalar field through Cloud Compare which contains other features? My goal is to colorize the render based on different features besides the COLORS_0 property, which either loads RGB or just black by default.
I couldn't find any documentation around that but if anyone has tried before me and figured it out it would be a huge help! Thank you!

@ibgreen
Copy link
Collaborator

ibgreen commented Mar 25, 2022

@AccomplishedCode Yes, supporting the LAS loader is a bit tricky as we are just wrapping an older transpiled C++ library. We don't really have good enough control of the source code to make changes.

It is possible that the column is loaded but not exposed by the loaders.gl JavaScript wrapper. If you poke around in the debugger and conclude the column is loaded then it may not be hard to fix, you might be able to propose a PR. If you were able to supply a small test file we might be able to take a look (no promises).

There is a recent effort that uses an updated LAS library: https://github.com/connormanning/copc.js. At some point we will likely replace the current LAS loader with something built on that code base.

@connormanning do you know if your COPC LAS loader will load "non-standard" columns?

@AccomplishedCode
Copy link
Author

@ibgreen Thank you for your response! And thank you for recommending me the copc library, looks like I could use it for the parsing! I'll also see if I can find it in the debugger, I'll try to edit some of the code inside the loaders.gl las loader to support optional extended variable length records (the fancy name for non standard columns).
I'll also try loading those fields from an ASCII csv cloud, just to see if I can assign the getColor accessor to a specific column in the csv file. Although CSV is never a good format to store point clouds, might be worth trying to figure out how to exactly assign attributes inside the las loader.
Lastly, @ibgreen I've seen your work in almost every github issue and updates related to Deck.gl, and I want to congratulate you and your colleagues on creating such a wonderful ecosystem. It's truly fantastic work, and I'm sure it must have taken insane amounts of energy and patience. Thank you for your contributions to the open source community!

@ibgreen
Copy link
Collaborator

ibgreen commented Mar 25, 2022

Thank you for your contributions to the open source community!

@AccomplishedCode Thank you for the warm words, it means a lot! Looking forward to see what you build, and I will be more than happy to look at any PRs you may contribute.

@hobu
Copy link

hobu commented Jun 28, 2022

@connormanning do you know if your COPC LAS loader will load "non-standard" columns?

Do you mean "Extra Bytes" dimensions in LAS parlance? The answer to that is yes it does. As part of the COPC.js effort, the LAZ handling code was updated significantly to make it work in both browser and node scenarios as well as catching up to the latest build stuff.

We would be happy to support someone doing a loaders.gl COPC implementation. It should be straightforward for someone who knows loaders.gl. Please contact me if you're interested.

@jo-chemla
Copy link

jo-chemla commented Mar 11, 2024

Opening a dedicated issue for COPC support within loaders.gl to track the progress in case anyone want to work on it - please do not hesitate to close if not on the roadmap.

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