GDAL
Classes | Macros | Functions
ogr_spatialref.h File Reference

Coordinate systems services. More...

#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
 Objects of this class are used to represent value nodes in the parsed representation of the WKT SRS format. More...
 
struct  OGR_SRSNode::Listener
 Listener that is notified of modification to nodes. More...
 
class  OGRSpatialReference
 This class represents an OpenGIS Spatial Reference System, and contains methods for converting between this object organization and well known text (WKT) format. More...
 
class  OGRCoordinateTransformation
 Interface for transforming between coordinate systems. More...
 
struct  OGRCoordinateTransformationOptions
 Context for coordinate transformation. More...
 

Macros

#define USGS_ANGLE_DECIMALDEGREES   0
 Angle is in decimal degrees. More...
 
#define USGS_ANGLE_PACKEDDMS   TRUE
 Angle is in packed degree minute second. More...
 
#define USGS_ANGLE_RADIANS   2
 Angle is in radians. More...
 

Functions

OGRCoordinateTransformationOGRCreateCoordinateTransformation (const OGRSpatialReference *poSource, const OGRSpatialReference *poTarget)
 Create transformation object. More...
 
OGRCoordinateTransformationOGRCreateCoordinateTransformation (const OGRSpatialReference *poSource, const OGRSpatialReference *poTarget, const OGRCoordinateTransformationOptions &options)
 Create transformation object. More...
 

Detailed Description

Coordinate systems services.

Macro Definition Documentation

#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.

Function Documentation

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 < 2.5, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration option can be set to YES.

Parameters
poSourcesource spatial reference system.
poTargettarget spatial reference system.
Returns
NULL on failure or a ready to use transformation object.
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 < 2.5, 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.

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.

Parameters
poSourcesource spatial reference system.
poTargettarget spatial reference system.
optionsCoordinate transformation options.
Returns
NULL on failure or a ready to use transformation object.
Since
GDAL 2.5

Generated for GDAL by doxygen 1.8.8.