ArcGIS Runtime SDK for iOS

List transformations


This sample demonstrates how to use the AGSTransformationCatalog to get a list of available AGSDatumTransformation that can be used to project an AGSGeometry between two different AGSSpatialReference, and how to use one of the transformations to perform the AGSGeometryEngine.project operation.

How it works

The sample sets the location of projection engine data on the device by calling AGSTransformationCatalog.setProjectionEngineDirectory.

The list of AGSDatumTransformation objects is created by calling AGSTransformationCatalog.transformationsBySuitability, passing in the AGSSpatialReference of the original geometry (the input spatial reference) and that of the AGSMap (the output spatial reference). Depending on the state of a switch control, the current visible extent of the map is used to sort the list by suitability.

When the user taps on a transformation in the list, the selected transformation is used to reproject an AGSPoint. The AGSGraphic's geometry is then updated with the new AGSPoint. If the selected transformation is not usable (has missing grid files) then no projected point is displayed.

In this topic
  1. Description