lasclip with realloc problems

54 views
Skip to first unread message

Thomas Becker

unread,
Jun 22, 2016, 3:51:47 AM6/22/16
to LAStools - efficient tools for LiDAR processing
Hi,

I am about to process a couple of thousand laz files and, unfortunately have to reclassify for building points.
In the attempt of getting things done I am having difficulties in my Python script.

The reclassification is based on building polygons in a rather big shapefile.
When running lasclip I am getting the following error:

    ERROR: cannot realloc point_buffer for 67108864 points.

The code I use to process the files is:

for laz in glob.glob('R:/Path_To/LAZ/*.laz'):
subprocess.call(['C:/.../LAStools/bin/lasclip.exe',
'-i', '{c_laz}'.format(c_laz=laz),
'-poly', 'R:/Path/Buildings/Buil_2016.shp',
'-odir', 'R:/Path_To/LAZ_RECLASS',
'-o', '{out}'.format(out=os.path.basename(laz)),
'-classify', '6',
'-interior'
])

How can I overcome the problem? Is it the shapefile, or the laz file? I assume it is the shapefile, since the number of points in the error message is always the same...


Cheers Thomas

Martin Isenburg

unread,
Jun 22, 2016, 4:31:53 AM6/22/16
to LAStools - efficient command line tools for LIDAR processing
Hello Thomas,

indeed. The SHP file has too many points / polygons. The lasclip algorithms needs to triangulate all the points in the SHP file and this operation is limited to about 20 million points due to the 2 GB memory limit of the current 32 bit executables.


Either you wait until the 64 bit version comes out (but right now LASzip for LAS 1.4 is on the front burner) or you break the polygons contents of your large SHP file into a number of smaller SHP files and run multiple passes over the LiDAR, one for each smaller SHP file.

Regards,

Martin @rapidlasso


Thomas Becker

unread,
Jun 22, 2016, 4:50:05 AM6/22/16
to LAStools - efficient tools for LiDAR processing
Hi Martin,

I was playing around with the shapefile in the meantime, and figured, that it works with smaller files (polygons), and I think I found a way to split the shapefile on the fly in my script.

Danke für den schnellen Support! Wirklich Klasse.

Gruß Thomas
Reply all
Reply to author
Forward
0 new messages