Struct gdal::spatial_ref::CoordTransformOptions
source · pub struct CoordTransformOptions { /* private fields */ }
Expand description
Options for CoordTransform::new_with_options
.
Implementations§
source§impl CoordTransformOptions
impl CoordTransformOptions
sourcepub fn new() -> Result<CoordTransformOptions>
pub fn new() -> Result<CoordTransformOptions>
Creation options for CoordTransform
.
sourcepub fn set_area_of_interest(
&mut self,
west_longitude_deg: f64,
south_latitude_deg: f64,
east_longitude_deg: f64,
north_latitude_deg: f64
) -> Result<()>
pub fn set_area_of_interest( &mut self, west_longitude_deg: f64, south_latitude_deg: f64, east_longitude_deg: f64, north_latitude_deg: f64 ) -> Result<()>
Sets an area of interest.
The west longitude is generally lower than the east longitude, except for areas of interest that go across the anti-meridian.
For more information, see Advanced Coordinate Transformation Tutorial.
Arguments
west_longitude_deg
– West longitude (in degree). Must be in [-180,180]south_latitude_deg
– South latitude (in degree). Must be in [-90,90]east_longitude_deg
– East longitude (in degree). Must be in [-180,180]north_latitude_deg
– North latitude (in degree). Must be in [-90,90]
sourcepub fn desired_accuracy(&mut self, accuracy: f64) -> Result<()>
pub fn desired_accuracy(&mut self, accuracy: f64) -> Result<()>
Sets the desired accuracy for coordinate operations.
Only coordinate operations that offer an accuracy of at least the one specified will be considered.
An accuracy of 0 is valid and means a coordinate operation made only of one or several conversions (map projections, unit conversion, etc.) Operations involving ballpark transformations have a unknown accuracy, and will be filtered out by any dfAccuracy >= 0 value.
If this option is specified with PROJ < 8, the OGR_CT_OP_SELECTION
configuration option
will default to BEST_ACCURACY
.
sourcepub fn set_ballpark_allowed(&mut self, ballpark_allowed: bool) -> Result<()>
pub fn set_ballpark_allowed(&mut self, ballpark_allowed: bool) -> Result<()>
Sets whether ballpark transformations are allowed.
By default, PROJ may generate “ballpark transformations” (see Glossary) when precise datum transformations are missing. For high accuracy use cases, such transformations might not be allowed.
If this option is specified with PROJ < 8, the OGR_CT_OP_SELECTION
configuration option
will default to BEST_ACCURACY
.
sourcepub fn set_coordinate_operation(
&mut self,
co: &str,
reverse: bool
) -> Result<()>
pub fn set_coordinate_operation( &mut self, co: &str, reverse: bool ) -> Result<()>
Sets a coordinate operation.
This is a user override to be used instead of the normally computed pipeline.
The pipeline must take into account the axis order of the source and target SRS.
The pipeline may be provided as a PROJ string (single step operation or multiple step
string starting with +proj=pipeline
), a WKT2 string describing a CoordinateOperation
,
or a "urn:ogc:def:coordinateOperation:EPSG::XXXX"
URN.
For more information, see Advanced Coordinate Transformation Tutorial.
Arguments
co
: PROJ or WKT string describing a coordinate operationreverse
: Whether the PROJ or WKT string should be evaluated in the reverse path