use crate::ellipsoid::Ellipsoid;
pub trait Projection: Send + Sync {
fn projected_to_rad(&self, x: f64, y: f64) -> (f64, f64);
fn rad_to_projected(&self, lon: f64, lat: f64) -> (f64, f64);
fn projected_to_deg(&self, x: f64, y: f64) -> (f64, f64) {
let tmp = self.projected_to_rad(x, y);
(tmp.0.to_degrees(), tmp.1.to_degrees())
}
fn deg_to_projected(&self, lon: f64, lat: f64) -> (f64, f64) {
self.rad_to_projected(lon.to_radians(), lat.to_radians())
}
}
pub trait PseudoSerialize {
fn to_constructed(&self) -> String;
}
pub trait DbContstruct {
fn from_database_params(params: &[(u32, f64)], ellipsoid: &Ellipsoid) -> Self;
}