pub enum Error {
Show 34 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),
OutOfAreaOfUse {
lon: f64,
lat: f64,
crs: String,
},
OutsideAreaOfUse {
lon: f64,
lat: f64,
epsg: u32,
west: f64,
south: f64,
east: f64,
north: f64,
},
Ntv2ParseError(String),
Ntv2OutOfGrid {
lon: f64,
lat: f64,
},
InvalidCompoundCrs {
reason: String,
},
GeoidNotAvailable {
vertical_crs: String,
},
GeoidFileFormat(String),
NoGeoidAvailable,
ProjDbError(String),
Other(String),
PipelineParseError(String),
PipelineStepError {
step: usize,
inner: 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
OutOfAreaOfUse
Coordinate is outside the source CRS area of use
OutsideAreaOfUse
Coordinate lies outside the registered area-of-use bounding box for
the source EPSG (raised by Transformer when the per-instance check
mode is AreaOfUseCheck::Strict).
Fields
Ntv2ParseError(String)
NTv2 binary grid-shift parse error
Ntv2OutOfGrid
Coordinate is outside all loaded NTv2 sub-grid extents
InvalidCompoundCrs
Invalid arguments for compound CRS construction.
GeoidNotAvailable
Geoid model required for vertical datum transformation is not available.
GeoidFileFormat(String)
Geoid grid file has an unexpected size, layout, or could not be read.
NoGeoidAvailable
No geoid model has been attached to a crate::transform::Transformer
that is being asked to perform a compound-CRS transform requiring a
vertical-datum shift.
ProjDbError(String)
Error from PROJ.db SQLite file (always present so non-proj-db builds also compile)
Other(String)
Generic error for cases not covered by specific error types
PipelineParseError(String)
Pipeline PROJ string could not be parsed.
PipelineStepError
A step inside a coordinate pipeline failed.
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.
Sourcepub fn out_of_area_of_use<S: Into<String>>(lon: f64, lat: f64, crs: S) -> Self
pub fn out_of_area_of_use<S: Into<String>>(lon: f64, lat: f64, crs: S) -> Self
Creates an out-of-area-of-use error.
Sourcepub fn ntv2_parse_error<S: Into<String>>(message: S) -> Self
pub fn ntv2_parse_error<S: Into<String>>(message: S) -> Self
Creates an NTv2 parse error.
Sourcepub fn ntv2_out_of_grid(lon: f64, lat: f64) -> Self
pub fn ntv2_out_of_grid(lon: f64, lat: f64) -> Self
Creates an NTv2 out-of-grid error.
Sourcepub fn invalid_compound_crs(reason: impl Into<String>) -> Self
pub fn invalid_compound_crs(reason: impl Into<String>) -> Self
Creates an invalid compound CRS error.
Sourcepub fn geoid_not_available(vertical_crs: impl Into<String>) -> Self
pub fn geoid_not_available(vertical_crs: impl Into<String>) -> Self
Creates a geoid-not-available error.
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()