diff --git a/src/convert_file.rs b/src/convert_file.rs index b66d88d..6ccc2af 100644 --- a/src/convert_file.rs +++ b/src/convert_file.rs @@ -1,7 +1,8 @@ extern crate rayon; use rayon::prelude::*; -use crate::{convert_pointcloud, create_station_file, StationPoint}; +use crate::convert_pointcloud::convert_pointcloud; +use crate::stations::{create_station_file, StationPoint}; use anyhow::{Context, Result}; use std::{collections::HashMap, sync::Mutex}; diff --git a/src/lib.rs b/src/lib.rs index 8a11727..81d6f1a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,6 +17,5 @@ mod stations; mod utils; pub use self::convert_file::convert_file; +pub use self::convert_point::convert_point; pub use self::convert_pointcloud::convert_pointcloud; -pub use self::stations::StationPoint; -pub use self::stations::{create_station_file, create_station_point, get_sum_coordinates}; diff --git a/src/stations.rs b/src/stations.rs index 143eb37..b68d377 100644 --- a/src/stations.rs +++ b/src/stations.rs @@ -18,7 +18,7 @@ pub struct StationPoint { pub z: f64, } -pub fn create_station_point(sum_coordinate: (f64, f64, f64), count: f64) -> StationPoint { +pub(crate) fn create_station_point(sum_coordinate: (f64, f64, f64), count: f64) -> StationPoint { StationPoint { x: sum_coordinate.0 / count, y: sum_coordinate.1 / count, @@ -26,7 +26,7 @@ pub fn create_station_point(sum_coordinate: (f64, f64, f64), count: f64) -> Stat } } -pub fn create_station_file( +pub(crate) fn create_station_file( output_path: String, stations: Mutex>, ) -> Result<()> { @@ -38,7 +38,7 @@ pub fn create_station_file( Ok(()) } -pub fn get_sum_coordinates( +pub(crate) fn get_sum_coordinates( sum_coordinates: (f64, f64, f64), point: &e57::Point, ) -> (f64, f64, f64) { diff --git a/src/utils.rs b/src/utils.rs index 031e749..450161d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,26 +1,6 @@ use anyhow::{Context, Result}; -use clap::Parser; use std::path::{Path, PathBuf}; -#[derive(Parser)] -#[command(author, version, about, long_about = None)] -struct Args { - #[arg(short, long)] - path: String, - - #[arg(short, long, default_value_t = String::from("./"))] - output: String, - - #[arg(short = 'P', long, default_value_t = false)] - progress: bool, - - #[arg(short = 'D', long, default_value_t = false)] - debug: bool, - - #[arg(short = 'T', long, default_value_t = 0)] - threads: usize, -} - pub(crate) fn construct_las_path(output_path: &String, index: usize) -> Result { let output_sub_dir_path = Path::new(&output_path).join("las");