las 0.9.11

Reads and writes point clouds stored in the ASPRS las file format.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Counts the number of points in a las file.

extern crate las;

use las::Reader;

fn main() {
    let path = std::env::args()
        .nth(1)
        .expect("Must provide a path to a las file");
    let mut reader = Reader::from_path(path).expect("Unable to open reader");
    let npoints = reader.points().collect::<Vec<Result<_, _>>>().len();
    println!("Number of points: {npoints}");
}