Skip To Content ArcGIS for Developers Sign In Dashboard

TransformationCatalog Class

(Esri::ArcGISRuntime::TransformationCatalog)

A singleton class for discovering and managing transformations. More...

Header: #include <TransformationCatalog>
Since: Esri::ArcGISRuntime 100.2
Inherits: Object

Public Functions

  • 31 public functions inherited from QObject

Static Public Members

TransformationCatalog *instance()
QString projectionEngineDirectory()
void setProjectionEngineDirectory(const QString &projectionEngineDirectory)
DatumTransformation *transformation(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference)
DatumTransformation *transformation(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference, const Envelope &areaOfInterest)
QList<DatumTransformation *> transformationsBySuitability(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference)
QList<DatumTransformation *> transformationsBySuitability(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference, const Envelope &areaOfInterest)
  • 10 static public members inherited from QObject

Additional Inherited Members

Detailed Description

A singleton class for discovering and managing transformations.

TransformationCatalog provides a mechanism for discovering available transformations. You can retrieve the default transformation or the best available transformation. Optionally, the area of interest may be considered in these calculations.

TransformationCatalog also allows you to set the location where Projection Engine data files are found on local storage. The projectionEngineDirectory property must be set before using any geometry classes.

Default transformations

The default transformation used is the most suitable one across the area covered by the input and output spatial references. You can sometimes get a more suitable transformation by specifying the extent your specific work area.

Member Function Documentation

TransformationCatalog::~TransformationCatalog()

Destructor.

[static] TransformationCatalog *TransformationCatalog::instance()

Returns the singleton instance of the TransformationCatalog.

Use this method to get a reference to this instance so you can connect its signals to slots.

[static] QString TransformationCatalog::projectionEngineDirectory()

Returns the location where Projection Engine data files are found on the local file system.

See also setProjectionEngineDirectory.

[static] void TransformationCatalog::setProjectionEngineDirectory(const QString &projectionEngineDirectory)

Sets the location of Projection Engine files on the local file system to projectionEngineDirectory.

This property must be set immediately upon process startup before any other API method calls.

See also projectionEngineDirectory().

[static] DatumTransformation *TransformationCatalog::transformation(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference)

Returns the default transformation without specifying an area of interest.

The default transformation is the one used in cases such as when calling GeometryEngine.project without specifying a transformation.

Returns nullptr if no transform is needed to project from inputSpatialReference to outputSpatialReference.

[static] DatumTransformation *TransformationCatalog::transformation(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference, const Envelope &areaOfInterest)

Returns the default transformation using an area of interest.

The default transformation is the one used when no transformation is specified in cases such a the following call to GeometryEngine::project.

Geometry mapGeometry = GeometryEngine.project(geometry, map.getSpatialReference());
  • inputSpatialReference - The SpatialReference that transformation is from.
  • outputSpatialReference - The SpatialReference that transformation is to.
  • areaOfInterest - A geographic extent expressed as an Envelope.

If areaOfInterest has a different spatial reference than inputSpatialReference, it will be reprojected to inputSpatialReference. If areaOfInterest doesn't intersect the area of use of inputSpatialReference, this method returns nullptr.

Returns nullptr if no transform is needed to project from inputSpatialReference to outputSpatialReference.

[static] QList<DatumTransformation *> TransformationCatalog::transformationsBySuitability(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference)

Returns the list of suitable datum transformations without specifying an area of interest.

Returns a list representing the datum transformations suitable for projecting between spatial references. The list is ordered in descending order by suitability, with the most suitable being first in the list. The list includes grid-based transformations, regardless of the presence or absence of required Projection Engine files supporting those transformations.

[static] QList<DatumTransformation *> TransformationCatalog::transformationsBySuitability(const SpatialReference &inputSpatialReference, const SpatialReference &outputSpatialReference, const Envelope &areaOfInterest)

Returns the list of suitable datum transformations using an area of interest.

Returns a list representing the datum transformations suitable for projecting between spatial references, and takes into account the area of interest. The list is ordered in descending order by suitability, with the most suitable being first in the list. The list includes grid-based transformations, regardless of the presence or absence of required Projection Engine files supporting those transformations.

  • inputSpatialReference - The SpatialReference that transformation is from.
  • outputSpatialReference - The SpatialReference that transformation is to.
  • areaOfInterest - A geographic extent expressed as an Envelope.

If areaOfInterest has a different spatial reference than inputSpatialReference, it will be reprojected to inputSpatialReference. If areaOfInterest doesn't intersect the area of use of inputSpatialReference, this method returns an empty list.


Feedback on this topic?