Creating LAX files with LASlib

297 views
Skip to first unread message

Evon Silvia

unread,
Jan 26, 2017, 11:45:47 PM1/26/17
to last...@googlegroups.com
Is there a way to programmatically create LAX (index) files for my LAS/LAZ files using LASlib/LASzip DLL? I see that I can use the LAX files using (laszip_)inside_rectangle(), but I don't see a way to create them other than running lasindex as an external tool.

If not, is lasindex open-source like laszip in that I can safely bundle it with my own executables?

Evon
--
Quantum Geospatial Logo
Evon Silvia PLS
Solutions Developer
517 SW 2nd Street, Suite 400, Corvallis, OR 97333
P: (541) 452-8502


Kirk Waters - NOAA Federal

unread,
Jan 27, 2017, 7:22:15 AM1/27/17
to LAStools - efficient command line tools for LIDAR processing, Evon Silvia
Evon,
Lasindex is in the open source set. You can see how it's working there. I usually made a small modification to it when a new release comes out to allow it to automatically pick the right scaling for data in geographic coordinates, so it's definitely in the open set.

Kirk Waters, PhD                     | NOAA Office for Coastal Management
Applied Sciences Program      | 2234 South Hobson Ave
843-740-1227                          | Charleston, SC 29405    

Martin Isenburg

unread,
Jan 31, 2017, 5:27:28 AM1/31/17
to LAStools - efficient command line tools for LIDAR processing, Evon Silvia
Hello,

the LASzip DLL supports the automatic creation of a LAX file while you write a LAZ or a LAS file. Prior to start writing points with laszip_write_indexed_point


you need to enable indexing with laszip_create_spatial_index


Note that the 'append' option is not currently supported via the DLL. 

There is currently no function to create an index for an existing file without writing it. Is that what you need?

Regards,

Martin @rapidlasso

Evon Silvia

unread,
Feb 1, 2017, 7:48:17 PM2/1/17
to Martin Isenburg, LAStools - efficient command line tools for LIDAR processing
Hi Martin,

This is useful information. I hadn't notice the laszip_create_spatial_index functionality. 

However, your latter question is more what I had in mind - creating a spatial index for an existing file that isn't currently loaded. It'd be great to create LAX files for swaths and tiles created by other software (e.g., TerraSolid tiles, swaths from sensor software) so that I can take advantage of the amazing buffering/rect functionality of LASzip.

Evon

Martin Isenburg

unread,
Feb 3, 2017, 11:53:27 PM2/3/17
to Evon Silvia, LAStools - efficient command line tools for LIDAR processing
Hello Evon.

That's what the lasindex tool is for. It is part of the open source component of LAStools and - if I understand LGPL 2.1 correctly - as long as you do not modify the source code you can simply distribute the binaries. You could simply make a system() call from your LASmonkey software to execute lasindex on file that already exist on disk. That would probably be faster, especially if you run it on LAZ files and with '-cores 8' ...


Martin @rapidlasso

Evon Silvia

unread,
Feb 6, 2017, 6:46:41 PM2/6/17
to Martin Isenburg, LAStools - efficient command line tools for LIDAR processing
Understood. Thanks Martin! Now that I have your intent in writing to confirm my interpretation of your licensing, I think I can roll with that. :)

Evon
Reply all
Reply to author
Forward
0 new messages