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

#include <ogr_spatialref.h>

Inheritance diagram for OGRCoordinateTransformation:
OGRProjCT

Public Member Functions

virtual OGRSpatialReferenceGetSourceCS ()=0
 
virtual OGRSpatialReferenceGetTargetCS ()=0
 
virtual bool GetEmitErrors () const
 
virtual void SetEmitErrors (bool)
 
int Transform (int nCount, double *x, double *y, double *z=nullptr, int *pabSuccess=nullptr)
 
virtual int Transform (int nCount, double *x, double *y, double *z, double *t, int *pabSuccess)=0
 

Static Public Member Functions

static void DestroyCT (OGRCoordinateTransformation *poCT)
 OGRCoordinateTransformation destructor. More...
 
static OGRCoordinateTransformationH ToHandle (OGRCoordinateTransformation *poCT)
 
static OGRCoordinateTransformationFromHandle (OGRCoordinateTransformationH hCT)
 

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

◆ DestroyCT()

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
poCTthe object to delete
Since
GDAL 1.7.0

◆ FromHandle()

static OGRCoordinateTransformation* OGRCoordinateTransformation::FromHandle ( OGRCoordinateTransformationH  hCT)
inlinestatic

Convert a OGRCoordinateTransformationH to a OGRCoordinateTransformation*.

Since
GDAL 2.3

Referenced by OCTDestroyCoordinateTransformation(), OCTTransform4D(), and OGR_G_Transform().

◆ GetEmitErrors()

virtual bool OGRCoordinateTransformation::GetEmitErrors ( ) const
inlinevirtual

Whether the transformer will emit CPLError

Reimplemented in OGRProjCT.

◆ GetSourceCS()

virtual OGRSpatialReference* OGRCoordinateTransformation::GetSourceCS ( )
pure virtual

Fetch internal source coordinate system.

Implemented in OGRProjCT.

Referenced by OGRGeometryFactory::transformWithOptions().

◆ GetTargetCS()

virtual OGRSpatialReference* OGRCoordinateTransformation::GetTargetCS ( )
pure virtual

Fetch internal target coordinate system.

Implemented in OGRProjCT.

Referenced by OGRPoint::transform(), OGRGeometryCollection::transform(), and OGRGeometryFactory::transformWithOptions().

◆ SetEmitErrors()

virtual void OGRCoordinateTransformation::SetEmitErrors ( bool  )
inlinevirtual

Set if the transformer must emit CPLError

Reimplemented in OGRProjCT.

◆ ToHandle()

static OGRCoordinateTransformationH OGRCoordinateTransformation::ToHandle ( OGRCoordinateTransformation poCT)
inlinestatic

Convert a OGRCoordinateTransformation* to a OGRCoordinateTransformationH.

Since
GDAL 2.3

◆ Transform() [1/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
nCountnumber of points to transform.
xarray of nCount X vertices, modified in place. Should not be NULL.
yarray of nCount Y vertices, modified in place. Should not be NULL.
zarray of nCount Z vertices, modified in place. Might be NULL.
pabSuccessarray 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.

References CPLMalloc().

Referenced by OGRPoint::transform(), and OGRSimpleCurve::transform().

◆ Transform() [2/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
nCountnumber of points to transform.
xarray of nCount X vertices, modified in place. Should not be NULL.
yarray of nCount Y vertices, modified in place. Should not be NULL.
zarray of nCount Z vertices, modified in place. Might be NULL.
tarray of nCount time values, modified in place. Might be NULL.
pabSuccessarray 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.

Implemented in OGRProjCT.


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

Generated for GDAL by doxygen 1.8.14.