CRSTransformer#
Full name: geomodelgrids::utils::CRSTransformer
Methods#
CRSTransformer()#
Constructor.
setSrc(const char* value)#
Set source coordinate system. String can be EPSG:XXXX, WKT, or Proj parameters.
value[in] String specifying source coordinate system.
setDest(const char* value)#
Set destination coordinate system. String can be EPSG:XXXX, WKT, or Proj parameters.
value[in] String specifying destination coordinate system.
initialize()#
Initialize transformer.
transform(double* destX, double* destY, const double* destZ, const double srcX, const double srcY, const double srcZ)#
Transform coordinates from source to destination coordinate system. If destZ
is nullptr
, then the z coordinate in the destination coordinate system is not computed.
destX[out] X coordinate in destination coordinate system.
destY[out] Y coordinate in destination coordinate system.
destZ[out] Z coordinate in destination coordinate system.
srcX[in] X coordinate in source coordinate system.
srcY[in] Y coordinate in source coordinate system.
srcZ[in] Z coordinate in source coordinate system.
inverse_transform(ouble* srcX, double* srcY, double* srcZ, const double destX, const double destY, const double destZ)#
Transform coordinates from destination to source coordinate system.
srcX[out] X coordinate in source coordinate system.
srcY[out] Y coordinate in source coordinate system.
srcZ[out] Z coordinate in source coordinate system (can be
nullptr
).destX[in] X coordinate in destination coordinate system.
destY[in] Y coordinate in destination coordinate system.
destZ[in] Z coordinate in destination coordinate system.
CRSTransformer* createGeoToXYAxisOrder(const char* crsString)#
Create CRSTransformer that transforms axis order from geo to xy order.
crsString[in] CRS for coordinate system.
returns CRSTransformer.