new stand-alone (!) DLL for reading and writing LAZ

533 views
Skip to first unread message

Martin Isenburg

unread,
Jul 30, 2013, 7:38:31 PM7/30/13
to LAStools - efficient command line tools for LIDAR processing, las...@googlegroups.com
Hello,

I have received several complaints that the integration of LASzip is not as trivial as it should be. There was either a dependency on libLAS or PDAL, an incompatible license issue (R) via LASlib, or the unwelcome exercise for the user to write their own DLL wrapper. Kudos to those who managed to integrate LAZ support into their products despite these hurdles (see http://laszip.org for a list).

Now there is an easy-to-use, stand-alone, ultra-light-weight DLL that can read and write both LAZ and LAS files up to LAS version 1.3 (and if only point types 0 - 5 are used then also LAS version 1.4). The new DLL interface together with a small laszipdllexample.cpp compressor/decompressor tool that illustrates how to use the DLL is available in the latest (130729) release of LAStools available here:


Recent conversations have suggested that missing LAZ support in some popular geo-spatial products such as IMAGINE, ArcGIS, or Terrascan must be blamed on my lack of providing a clean and simple way to integrate LASzip compression into other software. I hope this new LASzip DLL will remedy this soon ... (-:

Cheers,

Martin

PS1: please let me know if you find any bugs or issues with the DLL
PS2: there are also two new tools: lasnoise and blast2iso
PS3: lascanopy now also computes skewness and kurtosis

Martin Isenburg

unread,
Aug 1, 2013, 8:20:53 PM8/1/13
to LAStools - efficient command line tools for LIDAR processing, las...@googlegroups.com
Hello,

the first bugs have been found in the DLL. That's good news because it means that somebody is already using the new DLL to integrate LAZ support into a software package that many of you like to use ... (-: ... you can download the latest version via from http://rapidlasso.com via the pull down menu item LAStools->download.

Oh ... and this latest version (130731) also has a new option for lasground.exe called '-not_airborne'. I was experimenting with several terrestrial and mobile data sets and noticed that the airborne default settings sometimes give really bad results for finding ground in terrestrial and mobile data sets. So if you have had trouble with getting good group points in mobile or terrestrial scans ,,, try the new lasground.exe option '-not_airborne' ... and maybe first remove isolated noise points with the new lasnoise.exe ... more on that later.

Martin @rapidlasso

Ilves Risto

unread,
Aug 5, 2013, 6:29:00 AM8/5/13
to LAStools - efficient command line tools for LIDAR processing, las...@googlegroups.com
Hi,

Does all the other tools ignore points in processing, which are classified to
the class 7 as noise?

Regards,

Risto




***************************************************************

Risto Ilves - risto...@nls.fi
http://www.maanmittauslaitos.fi/

Maanmittauslaitos National Land Survey of Finland
Ilmakuvakeskus Aerial Image Centre
Oikokatu 11 Oikokatu 11
40700 Jyväskylä FIN-40700 Jyväskylä


Puhelin 040 514 6085 Phone +358 40 514 6085





Alessandro Montaghi

unread,
Aug 5, 2013, 6:41:15 AM8/5/13
to last...@googlegroups.com
Hi Risto, 

Using the - ASPRS Standard LIDAR Point Classes (see page 10 - Table 4.9) the class 7 meaning Low Point (noise)



Ale





--
Alessandro Montaghi

just some stuff:

"Python where we can, C++ where we must"

"My favorite part of the code in R are the lines of #"

Top 10 Things That Computer Programmers Hate:
     1. Waking Up Early
     2. Writing The F*cking Manual
     3. Not Drinking Coffee
     4. Reviewing Your Own Code 3 Months Later
     5. codes from other programmers without comments
     6. Error Checking
     7. (Not) Backing Up
     8. Debugging
     9. Leaving The House When Important Findings Come Up 
    10. Mathematic or Physics Formulas

Paula Litkey

unread,
Aug 5, 2013, 7:26:37 AM8/5/13
to last...@googlegroups.com
Hello,

This is all very nice and practical, thank you Martin! The usability is
excellent - if the data is already written in a file. In many cases,
however, the data are stored in memory in variables and the person who
wants to use LASzip or laswriter does not understand the beauty and
convenience in writing data into a file just to read it back into memory
again with your excellent tools. So how about some code samples on how
to write a laz file from I32 type variables x,y and z? Please??

Paula

Martin Isenburg

unread,
Aug 8, 2013, 6:22:38 AM8/8/13
to last...@googlegroups.com
Hello Risto,

you can either use the '-remove_noise' option instead of the default reclassification to class 7 and then the points are gone for good. Otherwise you will need to use either the '-drop_class 7' option (e.g. for las2dem, lasgrid, blast2dem, las2iso) or the '-ignore_class 7' option (e.g. for lasground and lasclassify and lasheight) in all subsequent calls.

Cheers,

Martin

On Mon, Aug 5, 2013 at 12:29 PM, Ilves Risto <risto...@nls.fi> wrote:

Evon Silvia

unread,
Aug 16, 2013, 1:51:20 PM8/16/13
to last...@googlegroups.com
Hi Martin,

I'm working on adding full, direct LAZ support to my program. Since my program's support for the LAZ format will naturally depend on the version of LASlib/LASzip that I built against, what sort of guarantees are there regarding LAZ versioning? Will the file format break older parsers only on major version changes, or will minor version changes also break the current parser?

For example, LAZ files produced by the current version of LASzip uses compression version 2.1r0. Should I abort opening the file if I detect a major compression version over 2, or anything higher than 2.1, or anything high than 2.1r0?

Or does LASlib or the DLL already handle the issue of compression versioning, and I just need to check for a success boolean after attempting to open a file?

Thanks!
Evon


On Thu, Aug 1, 2013 at 5:20 PM, Martin Isenburg <martin....@gmail.com> wrote:
Hello,

the first bugs have been found in the DLL. That's good news because it means that somebody is already using the new DLL to integrate LAZ support into a software package that many of you like to use ... (-: ... you can download the latest version via from http://rapidlasso.com via the pull down menu item LAStools->download.

Oh ... and this latest version (130731) also has a new option for lasground.exe called '-not_airborne'. I was experimenting with several terrestrial and mobile data sets and noticed that the airborne default settings sometimes give really bad results for finding ground in terrestrial and mobile data sets. So if you have had trouble with getting good group points in mobile or terrestrial scans ,,, try the new lasground.exe option '-not_airborne' ... and maybe first remove isolated noise points with the new lasnoise.exe ... more on that later.

Martin @rapidlasso

On Wed, Jul 31, 2013 at 1:38 AM, Martin Isenburg <martin....@gmail.com> wrote:
Hello,

I have received several complaints that the integration of LASzip is not as trivial as it should be. There was either a dependency on libLAS or PDAL, an incompatible license issue (R) via LASlib, or the unwelcome exercise for the user to write their own DLL wrapper. Kudos to those who managed to integrate LAZ support into their products despite these hurdles (see http://laszip.org for a list).

Now there is an easy-to-use, stand-alone, ultra-light-weight DLL that can read and write both LAZ and LAS files up to LAS version 1.3 (and if only point types 0 - 5 are used then also LAS version 1.4). The new DLL interface together with a small laszipdllexample.cpp compressor/decompressor tool that illustrates how to use the DLL is available in the latest (130729) release of LAStools available here:


Recent conversations have suggested that missing LAZ support in some popular geo-spatial products such as IMAGINE, ArcGIS, or Terrascan must be blamed on my lack of providing a clean and simple way to integrate LASzip compression into other software. I hope this new LASzip DLL will remedy this soon ... (-:

Cheers,

Martin

PS1: please let me know if you find any bugs or issues with the DLL
PS2: there are also two new tools: lasnoise and blast2iso
PS3: lascanopy now also computes skewness and kurtosis


Martin Isenburg

unread,
Aug 17, 2013, 5:08:11 PM8/17/13
to last...@googlegroups.com, paula....@fgi.fi, las...@googlegroups.com
Hello Paula,

per your request I added a few more "convenience" functions to the DLL that do, for example, the F64 to I32 coordinate conversion for you. There is now an EXAMPLE_THREE in the laszipdllexample.cpp file that shows how to use the DLL to write out a LAZ/LAS file from "scratch". I will probably add a few more "convenience" functions later that will allow you to automatically update the return counts and the bounding box in the header once you are done writing the file ... eventually that is. Hope the added functionality will do the trick for you already.

You will find the newest DLL inside the latest lastools.zip distribution (130817) that I just put online.

Regards,

Martin @rapidlasso

--
http://rapidlasso.com - fast tools to zip your LiDARs

Martin Isenburg

unread,
Aug 18, 2013, 4:30:12 AM8/18/13
to last...@googlegroups.com
Hello Evon,

my intention is to have the LASzip DLL (as well as LASlib) handle the issue of versioning for you. So should there ever be an issue with a newer version producing a non-clean exit then this would be a bug. Also ... since the code is open source ... you could verify for yourself if the current checks are sufficient and - should you find a weakness - suggest a patch.

In general i am trying to be very careful with LASzip as the LAZ format has now become a de-facto standard and has been added to so many other software packages. However, i am a little less careful with LASlib as the reason-de-etre for LASlib is being the engine for LAStools and here fast adaptation to new needs is more important than maintaining continuity across releases.

Cheers,

Martin @rapidlasso      
Reply all
Reply to author
Forward
0 new messages