LASzip in a (Chrome) browser

357 views
Skip to first unread message

Howard Butler

unread,
Mar 3, 2014, 8:35:44 AM3/3/14
to last...@googlegroups.com
Just a notice to let you know that I have implemented a Google Native Client shim for LASzip that allows it to be used as an <embed> plugin inside of Chrome. With my colleague Uday Verma, we have developed a WebGL-enabled point cloud renderer that utilizes LASzip (and LAS too, of course) to provide the data. This means you can open and view your own local LASzip files in a web browser without need for any special visualization software. You need the latest Chrome Canary to be able to run the demo, and you can find it at

http://plas.io

Google Native Client is some neat technology that allows you to compile native C/C++ into sandboxed intermediate code that the browser can run. What had started as a question to Martin of "LASzip in JavaScript?" ended as small module and a little bit of software development effort. I only had to implement the Pepper API to allow LASzip to communicate objects back and forth. Once I got the hang of the toolchain, it was straightforward to implement. The latest code is checked into the LASzip repository. It is a little bit finicky to get going with, but you can find the hobu-nacl.sh script to provide you guidance on how to build it yourself if you are interested. http://plas.io provides a pre-compiled and demonstration of its usage for those who are interested in hacking with it right away.

Like LASzip, plasio is also open source. We hope that people find it useful enough to start contributing to it via github. A fully-featured, open source, web-based LiDAR viewer is much closer to reality, and we hope that it is interesting enough for your contributions.

Howard

Martin Isenburg

unread,
Mar 3, 2014, 9:04:45 AM3/3/14
to LAStools - efficient command line tools for LIDAR processing
Jaw just dropped ... 

Could the sandboxed intermediate code of the Google Native Client benefit from multithreaded native C/C++ decompression library?

Terje Mathisen

unread,
Mar 3, 2014, 9:39:27 AM3/3/14
to last...@googlegroups.com
Howard Butler wrote:
> Just a notice to let you know that I have implemented a Google Native
> Client shim for LASzip that allows it to be used as an <embed> plugin
> inside of Chrome. With my colleague Uday Verma, we have developed a
> WebGL-enabled point cloud renderer that utilizes LASzip (and LAS too,
> of course) to provide the data. This means you can open and view your
> own local LASzip files in a web browser without need for any special
> visualization software. You need the latest Chrome Canary to be able
> to run the demo, and you can find it at
>
> http://plas.io

That was amazing!

It failed (*) when I tried to load a single tile from one of my own
projects, but when I tried the Half Dome sample I was blown away. :-)

Back in 1981 I hiked up to the (north) shoulder of Half Dome with a
friend. We slept there that night then we climbed the classic North West
Face route the next morning, I could clearly recognize our camp site
plus parts of the trail to get up there.

Its a pity about those missing coverage areas, but it still brought back
a lot of memories.

Thanks!

Terje
(*) Error! Property 'decoder' of object [object Object] is not a function
>
> Google Native Client is some neat technology that allows you to
> compile native C/C++ into sandboxed intermediate code that the
> browser can run. What had started as a question to Martin of "LASzip
> in JavaScript?" ended as small module and a little bit of software
> development effort. I only had to implement the Pepper API to allow
> LASzip to communicate objects back and forth. Once I got the hang of
> the toolchain, it was straightforward to implement. The latest code
> is checked into the LASzip repository. It is a little bit finicky to
> get going with, but you can find the hobu-nacl.sh script to provide
> you guidance on how to build it yourself if you are interested.
> http://plas.io provides a pre-compiled and demonstration of its usage
> for those who are interested in hacking with it right away.
>
> Like LASzip, plasio is also open source. We hope that people find it
> useful enough to start contributing to it via github. A
> fully-featured, open source, web-based LiDAR viewer is much closer to
> reality, and we hope that it is interesting enough for your
> contributions.
>
> Howard
>


--
- <Terje.M...@tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Howard Butler

unread,
Mar 3, 2014, 10:05:05 AM3/3/14
to last...@googlegroups.com

On Mar 3, 2014, at 8:04 AM, Martin Isenburg <martin....@gmail.com> wrote:

> Jaw just dropped ...
>
> Could the sandboxed intermediate code of the Google Native Client benefit from multithreaded native C/C++ decompression library?

Yes, multithreading would not be a problem. In fact, LASzip's thread safety'ness was an enabling factor for this approach to work.

Spatial indexing to support bbox queries would also be really useful. I know we can do that we lasindex as a side-car thing right now, but it'd be handy to have it all-in-one.

Howard

signature.asc

Howard Butler

unread,
Mar 3, 2014, 10:09:25 AM3/3/14
to last...@googlegroups.com

On Mar 3, 2014, at 8:39 AM, Terje Mathisen <terje.m...@tmsw.no> wrote:
> It failed (*) when I tried to load a single tile from one of my own projects, but when I tried the Half Dome sample I was blown away. :-)

Please file a ticket at http://github.com/verma/plasio with a link to the file if possible. I'm sure there's lots of pointy edges that have yet to be smoothed out. It's all open source, though, so hopefully others feel empowered to dive in...

Howard
signature.asc

DJ Lehto

unread,
Mar 3, 2014, 10:18:56 AM3/3/14
to last...@googlegroups.com
This is pretty cool. I tried a couple of local files and got them to load kind of. They seem to be inverted when I load them in, I'm wondering if that is projection related issue, and another file only seems to be visible in topview only and not the other perspectives. Samples look great and work well. Anyways it's still pretty amazing that it works that easy. Great job Howard and Uday, I'm looking forward to seeing awesome ideas like this help the industry bringing the ability for more people to look at LiDAR more easily.

D.J. Lehto | Production Manager
GeoDigital International Inc.
1 Antares Drive, Suite 140 | Ottawa, ON | Canada K2E 8C4
tel: 613-820-4545 x 286 | cell:  613-668-8522
fax: 613-820-9772 | toll free: 1-800-231-4969
website: www.geodigital.com


__________________________________________________________________
CONFIDENTIALITY NOTICE This E-Mail transmission and/or the documents accompanying it is for the sole use of the intended recipient(s). If you are not an intended recipient, you may not review, use, copy, disclose or distribute this message or any of the information contained in this message to anyone. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of this message and any attachments.
Reply all
Reply to author
Forward
0 new messages