pub enum Error {
Show 23 variants
InvalidEpsgCode {
code: u32,
},
EpsgCodeNotFound {
code: u32,
},
InvalidProjString {
reason: String,
},
InvalidWkt {
reason: String,
},
WktParseError {
position: usize,
message: String,
},
TransformationError {
reason: String,
},
UnsupportedCrs {
crs_type: String,
},
IncompatibleCrs {
src: String,
tgt: String,
},
InvalidCoordinate {
reason: String,
},
CoordinateOutOfBounds {
x: f64,
y: f64,
},
InvalidBoundingBox {
reason: String,
},
MissingParameter {
parameter: String,
},
InvalidParameter {
parameter: String,
reason: String,
},
DatumTransformError {
reason: String,
},
ProjectionInitError {
reason: String,
},
UnsupportedProjection {
projection: String,
},
NumericalError {
operation: String,
},
ConvergenceError {
iterations: usize,
},
JsonError(Error),
IoError(Error),
Utf8Error(Utf8Error),
Proj4rsError(String),
Other(String),
}Expand description
Comprehensive error type for projection operations.
Variants§
InvalidEpsgCode
Invalid EPSG code
EpsgCodeNotFound
EPSG code not found in database
InvalidProjString
Invalid PROJ string
InvalidWkt
Invalid WKT (Well-Known Text) string
WktParseError
WKT parsing error
TransformationError
Coordinate transformation error
UnsupportedCrs
Unsupported CRS (Coordinate Reference System)
IncompatibleCrs
Incompatible source and target CRS
InvalidCoordinate
Invalid coordinate
CoordinateOutOfBounds
Out of bounds coordinate
InvalidBoundingBox
Invalid bounding box
MissingParameter
Missing required parameter
InvalidParameter
Invalid parameter value
DatumTransformError
Datum transformation error
ProjectionInitError
Projection initialization error
UnsupportedProjection
Unsupported projection
NumericalError
Numerical error (e.g., division by zero, sqrt of negative)
ConvergenceError
Convergence failure in iterative algorithms
JsonError(Error)
JSON serialization/deserialization error
IoError(Error)
I/O error
Utf8Error(Utf8Error)
UTF-8 conversion error
Proj4rsError(String)
Error from proj4rs library
Other(String)
Generic error for cases not covered by specific error types
Implementations§
Source§impl Error
impl Error
Sourcepub fn invalid_epsg_code(code: u32) -> Self
pub fn invalid_epsg_code(code: u32) -> Self
Creates an invalid EPSG code error.
Sourcepub fn epsg_not_found(code: u32) -> Self
pub fn epsg_not_found(code: u32) -> Self
Creates an EPSG code not found error.
Sourcepub fn invalid_proj_string<S: Into<String>>(reason: S) -> Self
pub fn invalid_proj_string<S: Into<String>>(reason: S) -> Self
Creates an invalid PROJ string error.
Sourcepub fn invalid_wkt<S: Into<String>>(reason: S) -> Self
pub fn invalid_wkt<S: Into<String>>(reason: S) -> Self
Creates an invalid WKT error.
Sourcepub fn wkt_parse_error<S: Into<String>>(position: usize, message: S) -> Self
pub fn wkt_parse_error<S: Into<String>>(position: usize, message: S) -> Self
Creates a WKT parsing error.
Sourcepub fn transformation_error<S: Into<String>>(reason: S) -> Self
pub fn transformation_error<S: Into<String>>(reason: S) -> Self
Creates a transformation error.
Sourcepub fn unsupported_crs<S: Into<String>>(crs_type: S) -> Self
pub fn unsupported_crs<S: Into<String>>(crs_type: S) -> Self
Creates an unsupported CRS error.
Sourcepub fn incompatible_crs<S: Into<String>>(src: S, tgt: S) -> Self
pub fn incompatible_crs<S: Into<String>>(src: S, tgt: S) -> Self
Creates an incompatible CRS error.
Sourcepub fn invalid_coordinate<S: Into<String>>(reason: S) -> Self
pub fn invalid_coordinate<S: Into<String>>(reason: S) -> Self
Creates an invalid coordinate error.
Sourcepub fn coordinate_out_of_bounds(x: f64, y: f64) -> Self
pub fn coordinate_out_of_bounds(x: f64, y: f64) -> Self
Creates a coordinate out of bounds error.
Sourcepub fn invalid_bounding_box<S: Into<String>>(reason: S) -> Self
pub fn invalid_bounding_box<S: Into<String>>(reason: S) -> Self
Creates an invalid bounding box error.
Sourcepub fn missing_parameter<S: Into<String>>(parameter: S) -> Self
pub fn missing_parameter<S: Into<String>>(parameter: S) -> Self
Creates a missing parameter error.
Sourcepub fn invalid_parameter<S: Into<String>>(parameter: S, reason: S) -> Self
pub fn invalid_parameter<S: Into<String>>(parameter: S, reason: S) -> Self
Creates an invalid parameter error.
Sourcepub fn datum_transform_error<S: Into<String>>(reason: S) -> Self
pub fn datum_transform_error<S: Into<String>>(reason: S) -> Self
Creates a datum transform error.
Sourcepub fn projection_init_error<S: Into<String>>(reason: S) -> Self
pub fn projection_init_error<S: Into<String>>(reason: S) -> Self
Creates a projection initialization error.
Sourcepub fn unsupported_projection<S: Into<String>>(projection: S) -> Self
pub fn unsupported_projection<S: Into<String>>(projection: S) -> Self
Creates an unsupported projection error.
Sourcepub fn numerical_error<S: Into<String>>(operation: S) -> Self
pub fn numerical_error<S: Into<String>>(operation: S) -> Self
Creates a numerical error.
Sourcepub fn convergence_error(iterations: usize) -> Self
pub fn convergence_error(iterations: usize) -> Self
Creates a convergence error.
Sourcepub fn from_proj4rs<S: Into<String>>(message: S) -> Self
pub fn from_proj4rs<S: Into<String>>(message: S) -> Self
Creates an error from proj4rs library.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()