ArcGIS Runtime SDK for iOS

Geodesic operations


This sample demonstrates how to use AGSGeometryEngine to calculate a geodesic path between two points and measure its distance. Geodesic calculations take into account the curvature of the Earth, while planar calculations are based on a 2D Cartesian plane.

How it works


  1. Create an instance of AGSPolyline using two points.
  2. Densify the Polyline using the geodeticDensifyGeometry(_:maxSegmentLength:lengthUnit:curveType:) method on AGSGeometryEngine. This method will return a geodetically densified geometry.
  3. Set this geometry to a Graphic to display the geodesic path between two points in a Graphics Overlay.
  4. Get the geodetic distance of the path using the geodeticLength(of:lengthUnit:curveType:) method on AGSGeometryEngine.

In this topic
  1. Description