Coder Social home page Coder Social logo

laspy-waveform's Introduction

laspy-waveform

Laspy based lidar waveform reader.

Install

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

Usage

import WaveForm as wf

# example files
pfix = '100429_152240_2535pt_UTM'
fn_las = pfix + '.las'
fn_wdp = pfix + '.wdp'

# read entire files
idx, pts = wf.Read(fn_las, fn_wdp)

# export to RGB colored LAS file
wf.ExportLAS('fwf-' + fn_las, pts[:,3], pts)

Waveform LAS file in displaz

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as pl

# make a 3d plot with waveforms 5, 6 and 7
pts = pts[idx[5]:idx[8], :]
x, y, z, a = pts[:,0], pts[:,1], pts[:,2], pts[:,3]

# figure
fg = pl.figure(1, (8, 6))
ax = fg.add_subplot(111, projection = '3d')
im = ax.scatter(x, y, z, c = a, cmap = pl.cm.magma_r)
cb = fg.colorbar(im, ax = ax)
cb.set_label('Waveform amplitude')
ax.set_xlabel('UTM X [m]')
ax.set_ylabel('UTM Y [m]')
ax.set_zlabel('Elevation [m]')
pl.tight_layout()
pl.show()

Three waveforms in Matplotlib

Notes

See PulseWaves for Python code reading PulseWaves PLS files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.