项目作者: Rheinwalt

项目描述 :
Laspy based lidar waveform reading
高级语言: Python
项目地址: git://github.com/Rheinwalt/laspy-waveform.git
创建时间: 2020-08-23T11:46:20Z
项目社区:https://github.com/Rheinwalt/laspy-waveform

开源协议:MIT License

下载


laspy-waveform

Laspy based lidar waveform reader.

Install

  1. git clone https://github.com/Rheinwalt/laspy-waveform.git
  2. cp laspy-waveform/WaveForm.py ~/your/python/path

Usage

  1. import WaveForm as wf
  2. # example files
  3. pfix = '100429_152240_2535pt_UTM'
  4. fn_las = pfix + '.las'
  5. fn_wdp = pfix + '.wdp'
  6. # read entire files
  7. idx, pts = wf.Read(fn_las, fn_wdp)
  8. # export to RGB colored LAS file
  9. wf.ExportLAS('fwf-' + fn_las, pts[:,3], pts)

Waveform LAS file in displaz

  1. from mpl_toolkits.mplot3d import Axes3D
  2. import matplotlib.pyplot as pl
  3. # make a 3d plot with waveforms 5, 6 and 7
  4. pts = pts[idx[5]:idx[8], :]
  5. x, y, z, a = pts[:,0], pts[:,1], pts[:,2], pts[:,3]
  6. # figure
  7. fg = pl.figure(1, (8, 6))
  8. ax = fg.add_subplot(111, projection = '3d')
  9. im = ax.scatter(x, y, z, c = a, cmap = pl.cm.magma_r)
  10. cb = fg.colorbar(im, ax = ax)
  11. cb.set_label('Waveform amplitude')
  12. ax.set_xlabel('UTM X [m]')
  13. ax.set_ylabel('UTM Y [m]')
  14. ax.set_zlabel('Elevation [m]')
  15. pl.tight_layout()
  16. pl.show()

Three waveforms in Matplotlib

Notes

See PulseWaves for Python code reading PulseWaves PLS files.