pub fn new<'a>(file_name: &'a str, file_mode: &'a str) -> Result<LasFile, Error> {
        //LasFile {
        let mut lf = LasFile {
            file_name: file_name.to_string(),
            ..Default::default()
        };
        lf.file_mode = file_mode.to_lowercase();
        if lf.file_mode == "r" || lf.file_mode == "rh" {
            try!(lf.read());
        } else {
            lf.file_mode = "w".to_string();
        }
        // lf.point_buffer_size = 1000000;
        lf.use_point_intensity = true;
        lf.use_point_userdata = true;
        Ok(lf)
    }
/// Constructs a new `LasFile` based on a file.
/// The function takes the name of an existing raster file (`file_name`)
/// and the `file_mode`, wich can be 'r' (read), 'rh' (read header), and
/// 'w' (write).
Constructs a new `LasFile` based on a file.
Constructs a new ` LasFile ` based on a file .
pub fn new<'a>(file_name: &'a str, file_mode: &'a str) -> Result<LasFile, Error> {
        //LasFile {
        let mut lf = LasFile {
            file_name: file_name.to_string(),
            ..Default::default()
        };
        lf.file_mode = file_mode.to_lowercase();
        if lf.file_mode == "r" || lf.file_mode == "rh" {
            try!(lf.read());
        } else {
            lf.file_mode = "w".to_string();
        }
        // lf.point_buffer_size = 1000000;
        lf.use_point_intensity = true;
        lf.use_point_userdata = true;
        Ok(lf)
    }
pub fn new < ' a > ( file_name : & ' a str , file_mode : & ' a str ) -> Result < LasFile , Error > { //LasFile { let mut lf = LasFile { file_name : file_name . to_string ( ) , .. Default :: default ( ) } ; lf . file_mode = file_mode . to_lowercase ( ) ; if lf . file_mode == " " || lf . file_mode == " " { try ! ( lf read ( ) ) ; } else { lf . file_mode = " " . to_string ( ) ; } // lf.point_buffer_size = 1000000; lf . use_point_intensity = true ; lf . use_point_userdata = true ; Ok ( lf ) }
Constructs a new `LasFile` based on a file.
Constructs a new ` LasFile ` based on a file .
file_name
&'a str
file_mode
&'a str
file_name
&'a str
file_mode
&'a str