message: Return result from invert_geo_transform
diff: @@ -66,12 +66,18 @@ pub fn apply_geo_transform(geo_transform: &GeoTransform, pixel: f64, line: f64)
  /// Wraps [GDALInvGeoTransform].
  ///
  /// [GDALInvGeoTransform]: https://gdal.org/api/raster_c_api.html#_CPPv419GDALInvGeoTransformPdPd
  -pub fn inv_geo_transform(geo_transform: &GeoTransform) -> GeoTransform {
  +pub fn invert_geo_transform(geo_transform: &GeoTransform) -> errors::Result<GeoTransform> {
  let mut gt_out: GeoTransform = Default::default();
  unsafe {
  - gdal_sys::GDALInvGeoTransform(geo_transform.as_ptr() as *mut f64, gt_out.as_mut_ptr());
  + if gdal_sys::GDALInvGeoTransform(geo_transform.as_ptr() as *mut f64, gt_out.as_mut_ptr())
  + == 0
  + {
  + return Err(errors::GdalError::BadArgument(
  + "Geo transform is uninvertible".to_string(),
  + ));
  }
  - gt_out
  + }
  + Ok(gt_out)
  }
  #[cfg(test)]
  