Interface for transforming between coordinate systems.
More...
#include <ogr_spatialref.h>
Inherited by AxisMappingCoordinateTransformation, CompositeCT, CutlineTransformer, and GCPCoordTransformation.
|
virtual OGRSpatialReference * | GetSourceCS ()=0 |
| Fetch internal source coordinate system.
|
|
virtual OGRSpatialReference * | GetTargetCS ()=0 |
| Fetch internal target coordinate system.
|
|
virtual bool | GetEmitErrors () const |
| Whether the transformer will emit CPLError.
|
|
virtual void | SetEmitErrors (bool) |
| Set if the transformer must emit CPLError.
|
|
int | Transform (int nCount, double *x, double *y, double *z=nullptr, int *pabSuccess=nullptr) |
| Transform points from source to destination space. More...
|
|
virtual int | Transform (int nCount, double *x, double *y, double *z, double *t, int *pabSuccess)=0 |
| Transform points from source to destination space. More...
|
|
virtual int | TransformWithErrorCodes (int nCount, double *x, double *y, double *z, double *t, int *panErrorCodes) |
| Transform points from source to destination space. More...
|
|
virtual OGRCoordinateTransformation * | Clone () const =0 |
| Clone. More...
|
|
virtual OGRCoordinateTransformation * | GetInverse () const =0 |
| Return a coordinate transformation that performs the inverse transformation of the current one. More...
|
|
Interface for transforming between coordinate systems.
Currently, the only implementation within OGR is OGRProjCT, which requires the PROJ library.
Also, see OGRCreateCoordinateTransformation() for creating transformations.
◆ Clone()
◆ DestroyCT()
◆ FromHandle()
Convert a OGRCoordinateTransformationH to a OGRCoordinateTransformation*.
- Since
- GDAL 2.3
◆ GetInverse()
Return a coordinate transformation that performs the inverse transformation of the current one.
In some cases, this is not possible, and this method might return nullptr, or fail to perform the transformations.
- Returns
- the new coordinate transformation, or nullptr in case of error.
- Since
- GDAL 3.3
◆ ToHandle()
Convert a OGRCoordinateTransformation* to a OGRCoordinateTransformationH.
- Since
- GDAL 2.3
◆ Transform() [1/2]
virtual int OGRCoordinateTransformation::Transform |
( |
int |
nCount, |
|
|
double * |
x, |
|
|
double * |
y, |
|
|
double * |
z, |
|
|
double * |
t, |
|
|
int * |
pabSuccess |
|
) |
| |
|
pure virtual |
Transform points from source to destination space.
This method is the same as the C function OCTTransform4D().
- Parameters
-
nCount | number of points to transform. |
x | array of nCount X vertices, modified in place. Should not be NULL. |
y | array of nCount Y vertices, modified in place. Should not be NULL. |
z | array of nCount Z vertices, modified in place. Might be NULL. |
t | array of nCount time values, modified in place. Might be NULL. |
pabSuccess | array of per-point flags set to TRUE if that point transforms, or FALSE if it does not. Might be NULL. |
- Returns
- TRUE if some or all points transform successfully, or FALSE if if none transform.
◆ Transform() [2/2]
int OGRCoordinateTransformation::Transform |
( |
int |
nCount, |
|
|
double * |
x, |
|
|
double * |
y, |
|
|
double * |
z = nullptr , |
|
|
int * |
pabSuccess = nullptr |
|
) |
| |
Transform points from source to destination space.
This method is the same as the C function OCTTransformEx().
- Parameters
-
nCount | number of points to transform. |
x | array of nCount X vertices, modified in place. Should not be NULL. |
y | array of nCount Y vertices, modified in place. Should not be NULL. |
z | array of nCount Z vertices, modified in place. Might be NULL. |
pabSuccess | array of per-point flags set to TRUE if that point transforms, or FALSE if it does not. Might be NULL. |
- Returns
- TRUE if some or all points transform successfully, or FALSE if if none transform.
◆ TransformWithErrorCodes()
virtual int OGRCoordinateTransformation::TransformWithErrorCodes |
( |
int |
nCount, |
|
|
double * |
x, |
|
|
double * |
y, |
|
|
double * |
z, |
|
|
double * |
t, |
|
|
int * |
panErrorCodes |
|
) |
| |
|
virtual |
Transform points from source to destination space.
This method is the same as the C function OCTTransform4DWithErrorCodes().
- Parameters
-
nCount | number of points to transform. |
x | array of nCount X vertices, modified in place. Should not be NULL. |
y | array of nCount Y vertices, modified in place. Should not be NULL. |
z | array of nCount Z vertices, modified in place. Might be NULL. |
t | array of nCount time values, modified in place. Might be NULL. |
panErrorCodes | Output array of nCount value that will be set to 0 for success, or a non-zero value for failure. Refer to PROJ 8 public error codes. Might be NULL |
- Returns
- TRUE if some or all points transform successfully, or FALSE if if none transform.
- Since
- GDAL 3.3, and PROJ 8 to be able to use PROJ public error codes
The documentation for this class was generated from the following files: