OGR
|
#include "cpl_string.h"
#include "ogr_srs_api.h"
#include <cstddef>
#include <map>
#include <memory>
#include <vector>
Go to the source code of this file.
Classes | |
class | OGR_SRSNode |
struct | OGR_SRSNode::Listener |
class | OGRSpatialReference |
class | OGRCoordinateTransformation |
struct | OGRCoordinateTransformationOptions |
Macros | |
#define | USGS_ANGLE_DECIMALDEGREES 0 |
#define | USGS_ANGLE_PACKEDDMS TRUE |
#define | USGS_ANGLE_RADIANS 2 |
Functions | |
OGRCoordinateTransformation * | OGRCreateCoordinateTransformation (const OGRSpatialReference *poSource, const OGRSpatialReference *poTarget) |
OGRCoordinateTransformation * | OGRCreateCoordinateTransformation (const OGRSpatialReference *poSource, const OGRSpatialReference *poTarget, const OGRCoordinateTransformationOptions &options) |
Coordinate systems services.
#define USGS_ANGLE_DECIMALDEGREES 0 |
Angle is in decimal degrees.
#define USGS_ANGLE_PACKEDDMS TRUE |
Angle is in packed degree minute second.
#define USGS_ANGLE_RADIANS 2 |
Angle is in radians.
OGRCoordinateTransformation* OGRCreateCoordinateTransformation | ( | const OGRSpatialReference * | poSource, |
const OGRSpatialReference * | poTarget | ||
) |
Create transformation object.
This is the same as the C function OCTNewCoordinateTransformation().
Input spatial reference system objects are assigned by copy (calling clone() method) and no ownership transfer occurs.
The delete operator, or OCTDestroyCoordinateTransformation() should be used to destroy transformation objects.
This will honour the axis order advertized by the source and target SRS, as well as their "data axis to SRS axis mapping". To have a behaviour similar to GDAL < 3.0, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration option can be set to YES.
poSource | source spatial reference system. |
poTarget | target spatial reference system. |
Referenced by OCTNewCoordinateTransformation(), OCTNewCoordinateTransformationEx(), and OGRGeometryFactory::transformWithOptions().
OGRCoordinateTransformation* OGRCreateCoordinateTransformation | ( | const OGRSpatialReference * | poSource, |
const OGRSpatialReference * | poTarget, | ||
const OGRCoordinateTransformationOptions & | options | ||
) |
Create transformation object.
This is the same as the C function OCTNewCoordinateTransformationEx().
Input spatial reference system objects are assigned by copy (calling clone() method) and no ownership transfer occurs.
The delete operator, or OCTDestroyCoordinateTransformation() should be used to destroy transformation objects.
This will honour the axis order advertized by the source and target SRS, as well as their "data axis to SRS axis mapping". To have a behaviour similar to GDAL < 3.0, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration option can be set to YES.
The source SRS and target SRS should generally not be NULL. This is only allowed if a custom coordinate operation is set through the hOptions argument.
Starting with GDAL 3.0.3, the OGR_CT_OP_SELECTION configuration option can be set to PROJ (default if PROJ >= 6.3), BEST_ACCURACY or FIRST_MATCHING to decide of the strategy to select the operation to use among candidates, whose area of use is compatible with the points to transform. It is only taken into account if no user defined coordinate transformation pipeline has been specified.
If options contains a user defined coordinate transformation pipeline, it will be unconditionally used. If options has an area of interest defined, it will be used to research the best fitting coordinate transformation (which will be used for all coordinate transformations, even if they don't fall into the declared area of interest) If no options are set, then a list of candidate coordinate operations will be reseached, and at each call to Transform(), the best of those candidate regarding the centroid of the coordinate set will be dynamically selected.
poSource | source spatial reference system. |
poTarget | target spatial reference system. |
options | Coordinate transformation options. |
References OGRProjCT::Initialize().