VeloView has an export to LAS file format command but you would not know it as it is not available from the graphical user interface. To generate LAS files, it is necessary to use the Python command line interface. The steps below show how it can be done.
- Run VeloView and load a Velodyne PCAP file.
- Choose Tools | Python Console.
The Python Console appears. - To export out the current frame, type in the following command at the Python prompt.
>>> vv.saveLASCurrentFrame('c:/path/to/output.las', 0)
Note 1: the last argument indicates the coordinate transformation mode. 0 = raw, 1 = absolute, 2 = relative.
Note 2: Replace c:/path/to/ with your actual file system path - To export a range of frames by frame numbers, type in the following command at the Python prompt.
>>> vv.saveLASFrames('c:/path/to/output.las', 10, 20, 0)
Note: in this example, 10 is the starting frame, 20 is the ending frame, and 0 is the raw transformation mode. - To export a list of frames by time steps, type in the following command at the Python prompt.
>>> vv.saveLAS('c:/path/to/output/las', timesteps, 0)
Note: timesteps is an array of integers specifying the time steps e.g. [0,1,2,...10] and 0 is the raw transformation mode.
To get the available time steps in the PCAP file, type in the following command at the Python prompt.
>>> timesteps = vv.getCurrentTimesteps() - Optional. Display the resultant LAS file in a viewer.
8 comments:
I am unable to get this feature working properly. Upon loading the velodyne (hi-res) in the VeloView software (3.5.0, 64bit), I attempt to save the current frame via vv.saveLASCurrentFrame() function. The function, along with the other LAS functions, throws a AttributeError: 'NoneType' object has no attribute 'GetClientSideObject' from the getPosition().GetClientObject().GetOutput() call in applogic.py (line 783).
Any thoughts?
That's weird. No idea, maybe it is something with the Python installation. Maybe you can open an issue on the Veloview github site.
When I run the script it says this:
>>> vv.saveLASCurrentFrame('c:/path/to/output.las', 0)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'saveLASCurrentFrame'
Please Help. I really need to convert .pcap file to las
@Unknown, please replace the c:/path/to/output.las in the command with your actual file path.
Post a Comment