las 0.7.4

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

extern crate las;

use las::{Read, Reader};

fn main() {
    let path = std::env::args()
        .skip(1)
        .next()
        .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()
        .map(|p| p.expect("Unable to read point"))
        .count();
    println!("Number of points: {}", npoints);
}