GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | List of all members
OGRCoordinateTransformation Class Referenceabstract

Interface for transforming between coordinate systems. More...

`#include <ogr_spatialref.h>`

Inherited by AxisMappingCoordinateTransformation, CompositeCT, CutlineTransformer, GCPCoordTransformation, and OGRProjCT.

## Public Member Functions
virtual OGRSpatialReference * | GetSourceCS ()=0
| Fetch internal source coordinate system. More...
virtual OGRSpatialReference * | GetTargetCS ()=0
| Fetch internal target coordinate system. More...
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...

## Static Public Member Functions
static void | DestroyCT (OGRCoordinateTransformation *poCT)
| OGRCoordinateTransformation destructor. More...
static OGRCoordinateTransformationH | ToHandle (OGRCoordinateTransformation *poCT)
| Convert a OGRCoordinateTransformation* to a OGRCoordinateTransformationH. More...
static OGRCoordinateTransformation * | FromHandle (OGRCoordinateTransformationH hCT)
| Convert a OGRCoordinateTransformationH to a OGRCoordinateTransformation*. More...

## Detailed Description

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.

## Member Function Documentation

void OGRCoordinateTransformation::DestroyCT | ( | OGRCoordinateTransformation * | poCT | ) |
| static

OGRCoordinateTransformation destructor.

This function is the same as OGRCoordinateTransformation::~OGRCoordinateTransformation() and OCTDestroyCoordinateTransformation()

This static method will destroy a OGRCoordinateTransformation. It is equivalent to calling delete on the object, but it ensures that the deallocation is properly executed within the OGR libraries heap on platforms where this can matter (win32).

Parameters

  poCT | the object to delete

Since
  GDAL 1.7.0

static OGRCoordinateTransformation* OGRCoordinateTransformation::FromHandle | ( | OGRCoordinateTransformationH | hCT | ) |
| inline static

Convert a OGRCoordinateTransformationH to a OGRCoordinateTransformation*.

Since
  GDAL 2.3

virtual OGRSpatialReference* OGRCoordinateTransformation::GetSourceCS | ( |  | ) |
| pure virtual

Fetch internal source coordinate system.

virtual OGRSpatialReference* OGRCoordinateTransformation::GetTargetCS | ( |  | ) |
| pure virtual

Fetch internal target coordinate system.

static OGRCoordinateTransformationH OGRCoordinateTransformation::ToHandle | ( | OGRCoordinateTransformation * | poCT | ) |
| inline static

Convert a OGRCoordinateTransformation* to a OGRCoordinateTransformationH.

Since
  GDAL 2.3

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.

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.

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

- ogr_spatialref.h
- ogrct.cpp

Generated for GDAL by 1.8.8.