I am trying to learn LASPY and am running into road blocks off the bat. I first ran into and Error 8 (Not enough storage is available to process this command) using my full sized LAS file (1.7GB). I was able to get around it by using FUSION's polyclipdata to create multiple smaller sized LAS files; just frustrating. The second road block I have run into, and I can't find out much about it, is:
ValueError: buffer size must be a multiple of element size
when I try:
import laspy
import numpy as np
from laspy import file
infile = file.File("F:/P834/temp/pointfile3_2.las", mode="r")
Error occurs on line 4.
I am trying to work through the tutorial http://laspy.readthedocs.io/en/latest/tut_part_1.html
What am I missing in my early start?
Full error printout:
Traceback (most recent call last):
File "F:/P834/laspy/laspy_tests.py", line 2, in <module>
infile = laspy.file.File('F:/P834/temp/pointfile3_2.las', mode='r')
File "C:\Python27\ArcGIS10.3\lib\site-packages\laspy\file.py", line 64, in __init__
self.open()
File "C:\Python27\ArcGIS10.3\lib\site-packages\laspy\file.py", line 75, in open
self._reader = base.Reader(self.filename, mode=self._mode)
File "C:\Python27\ArcGIS10.3\lib\site-packages\laspy\base.py", line 273, in __init__
self.setup_read_write(vlrs,evlrs, read_only=True)
File "C:\Python27\ArcGIS10.3\lib\site-packages\laspy\base.py", line 321, in setup_read_write
self.data_provider.point_map()
File "C:\Python27\ArcGIS10.3\lib\site-packages\laspy\base.py", line 163, in point_map
offset=self.manager.header.data_offset)
ValueError: buffer size must be a multiple of element size
laspy, are you trying to import a tiled las file that was created using FUSION? – Aaron Feb 28 '18 at 16:35laspyto see if your tiled las data is in fact corrupted: http://matsu.gina.alaska.edu/LiDAR/Caswell_Lakes/Point_Cloud/Classified/CL_001_NE_PtCl.las – Aaron Feb 28 '18 at 16:38lidRpackage recently and would recommend it over laspy. It is highly optimized for working with point cloud data with an emphasis on forestry applications. – Aaron Feb 28 '18 at 16:51lidRpackage, check out @JRR's github page which has many tutorials: https://github.com/Jean-Romain/lidR – Aaron Feb 28 '18 at 17:00