GDAL
Public Member Functions | List of all members
OGRCoordinateTransformationOptions Struct Reference

Context for coordinate transformation. More...

#include <ogr_spatialref.h>

Public Member Functions

 OGRCoordinateTransformationOptions ()
 Constructs a new OGRCoordinateTransformationOptions. More...
 
 OGRCoordinateTransformationOptions (const OGRCoordinateTransformationOptions &)
 Copy constructor. More...
 
OGRCoordinateTransformationOptionsoperator= (const OGRCoordinateTransformationOptions &)
 Assignment operator. More...
 
 ~OGRCoordinateTransformationOptions ()
 Destroys a OGRCoordinateTransformationOptions. More...
 
bool SetAreaOfInterest (double dfWestLongitudeDeg, double dfSouthLatitudeDeg, double dfEastLongitudeDeg, double dfNorthLatitudeDeg)
 Sets an area of interest. More...
 
bool SetDesiredAccuracy (double dfAccuracy)
 Sets the desired accuracy for coordinate operations. More...
 
bool SetBallparkAllowed (bool bAllowBallpark)
 Sets whether ballpark transformations are allowed. More...
 
bool SetCoordinateOperation (const char *pszCT, bool bReverseCT)
 Sets a coordinate operation. More...
 

Detailed Description

Context for coordinate transformation.

Since
GDAL 3.0

Constructor & Destructor Documentation

◆ OGRCoordinateTransformationOptions() [1/2]

OGRCoordinateTransformationOptions::OGRCoordinateTransformationOptions ( )

Constructs a new OGRCoordinateTransformationOptions.

Since
GDAL 3.0

◆ OGRCoordinateTransformationOptions() [2/2]

OGRCoordinateTransformationOptions::OGRCoordinateTransformationOptions ( const OGRCoordinateTransformationOptions other)

Copy constructor.

Since
GDAL 3.1

◆ ~OGRCoordinateTransformationOptions()

OGRCoordinateTransformationOptions::~OGRCoordinateTransformationOptions ( )

Destroys a OGRCoordinateTransformationOptions.

Since
GDAL 3.0

Member Function Documentation

◆ operator=()

OGRCoordinateTransformationOptions & OGRCoordinateTransformationOptions::operator= ( const OGRCoordinateTransformationOptions other)

Assignment operator.

Since
GDAL 3.1

◆ SetAreaOfInterest()

bool OGRCoordinateTransformationOptions::SetAreaOfInterest ( double  dfWestLongitudeDeg,
double  dfSouthLatitudeDeg,
double  dfEastLongitudeDeg,
double  dfNorthLatitudeDeg 
)

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.

Parameters
dfWestLongitudeDegWest longitude (in degree). Must be in [-180,180]
dfSouthLatitudeDegSouth latitude (in degree). Must be in [-90,90]
dfEastLongitudeDegEast longitude (in degree). Must be in [-180,180]
dfNorthLatitudeDegNorth latitude (in degree). Must be in [-90,90]
Returns
true in case of success.
Since
GDAL 3.0

◆ SetBallparkAllowed()

bool OGRCoordinateTransformationOptions::SetBallparkAllowed ( bool  bAllowBallpark)

Sets whether ballpark transformations are allowed.

By default, PROJ may generate "ballpark transformations" (see https://proj.org/glossary.html) 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.

Parameters
bAllowBallparkfalse to disable the user of ballpark transformations
Since
GDAL 3.3

◆ SetCoordinateOperation()

bool OGRCoordinateTransformationOptions::SetCoordinateOperation ( const char *  pszCO,
bool  bReverseCO 
)

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

Parameters
pszCOPROJ or WKT string describing a coordinate operation
bReverseCOWhether the PROJ or WKT string should be evaluated in the reverse path
Returns
true in case of success.
Since
GDAL 3.0

◆ SetDesiredAccuracy()

bool OGRCoordinateTransformationOptions::SetDesiredAccuracy ( double  dfAccuracy)

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.

Parameters
dfAccuracyaccuracy in meters (or a negative value to disable this filter)
Since
GDAL 3.3

The documentation for this struct was generated from the following files: