gadomski / las-rs

Read and write ASPRS las files, Rust edition.
MIT License
73 stars 32 forks source link

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Point(FormatNumber(131))' #18

Closed zwnk closed 5 years ago

zwnk commented 5 years ago

Hi, i'm fairly new to rust but i wanted to play around with some las files to see if i can implement some python stuff i did. But i already have an issue to open the las file:

use las::Reader;

fn main() {

    let _reader = Reader::from_path("b:\\data\\programming\\rust\\hello_cargo\\src\\autzen.laz").unwrap();

}

I get the error:

thread 'main' panicked at 'called Result::unwrap() on an Err value: Point(FormatNumber(131))', src\libcore\result.rs:997:5

Full debug msg: error.txt

gadomski commented 5 years ago

It looks like you haven't built with laz (compressed las) support. Try rebuilding with the laz feature, e.g. cargo build --features laz and try again.

zwnk commented 5 years ago

I rebuilt (cargo clean, cargo build) it but laz was not used. So i added it manually to my Cargo.toml and rebuilt. But still the same error.

gadomski commented 5 years ago

My apologies, I forgot that I had not published the most recent laz update. I just published v0.6.2, so make sure your Cargo.toml looks something like this and try again:

[package]
name = "las-test"
version = "0.1.0"
authors = ["Pete Gadomski <pete.gadomski@gmail.com>"]
edition = "2018"

[dependencies]
las = { "version" = "0.6", "features" = ["laz"] }
zwnk commented 5 years ago

thank you! that solved the issue.