1

I am trying to learn LASPY and am following a tutorial. I got an error when starting up using:

import laspy
infile = laspy.file.File("./laspytest/data/simple.las", mode="r")

where I got a storage error:

LaspyException: Error mapping file: [Error 8] Not enough storage is available to process this command

To try and get around this I tried FUSION's polyclipdata routine to parse the LAS file into 4 parcels:

command = 'polyclipdata /multifile ' + temp + '\\pointfile2.shp ' + temp + '\\pointfile3.shp {}'.format(in_las_file)
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 
(stdoutdata, stderrdata) = process.communicate()
if stderrdata:
   print stderrdata

When I try and work with LASPY again, I get the following error:

ValueError: buffer size must be a multiple of element size

I thought that this was a LASPY error and created a question to resolve it, however, after testing "clean" data, LASPY was determined to not be the problem (laspy ValueError: buffer size must be a multiple of element size). I am using Python 2.7.

Why is FUSION's polyclipdata not producing a usable product?

I started looking into R's lidr package and ran the readLAS command. I got the following messages:

ERROR: 'end-of-file' after 8196120 of 8196121 points
Warning messages:
1: Invalid file: header states the file contains 8196121 points but 8196120 were found. Header has been updated. 
2: Invalid file: header states the file contains 7570432 1st returns but 1028359 were found. Header has been updated. 
3: Invalid file: header states the file contains 482368 2nd returns but 979894 were found. Header has been updated. 
4: Invalid file: header states the file contains 114533 3rd returns but 936803 were found. Header has been updated. 
5: Invalid file: header states the file contains 25014 4th returns but 997835 were found. Header has been updated. 
6: Invalid file: header states the file contains 3477 5th returns but 1053020 were found. Header has been updated. 
7: 7369979 points below 0 found. 
8: Dataset is invalid: 1049976 points with a return number of 0 found. 

It looks as though the datasets created by FUSION messed up the header?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.