pub(crate) fn decode_latin1(bytes: &[u8]) -> String {
bytes.iter().map(|&b| b as char).collect()
}
pub(crate) const NULL_THRESHOLD: f64 = 1e29;
pub(crate) const DEFAULT_NULL_1E30: f64 = 1.0e30;
pub(crate) fn is_null_sentinel(z: f64, null: f64) -> bool {
z.abs() >= NULL_THRESHOLD || (z - null).abs() <= null.abs() * 1e-9
}
pub(crate) fn csv_error(context: &str, e: csv::Error) -> crate::foundation::GeoError {
use crate::foundation::GeoError;
if matches!(e.kind(), csv::ErrorKind::Io(_)) {
match e.into_kind() {
csv::ErrorKind::Io(io) => GeoError::Io(io),
_ => unreachable!("kind() reported Io"),
}
} else {
GeoError::Parse(format!("{context}: {e}"))
}
}
pub mod container;
pub mod cps3;
pub mod crsmeta;
pub mod csv_points;
pub mod detect;
pub mod earthvision;
pub mod serial;
pub mod irap;
pub mod las;
pub(crate) mod log_data;
pub mod petrel_tops;
pub(crate) mod point_data;
pub(crate) mod polygon_data;
pub(crate) mod surface_data;
pub mod tops;
pub mod vector;
pub mod vector_write;
pub mod wellpath;
pub mod xyz;
pub(crate) use log_data::{LogCurveData, LogData};
pub(crate) use point_data::{normalize_attr_name, PointData};
pub(crate) use polygon_data::PolygonData;
pub(crate) use surface_data::SurfaceData;