ArcGIS Runtime SDK for iOS

Spatial relationships

Description

This sample demonstrates how to use the AGSGeometryEngine to evaluate the spatial relationships between geometries.

How it works

Tap on the map to select the graphic and its geometry will be used to check the spatial relationships with other graphics geometries. The result will be displayed in the popover.

The following AGSGeometryEngine methods are executed to determine the spatial relationship between the selected graphic and the unselected graphics:

  • geometry(_:crossesGeometry:)
  • geometry(_:contains:)
  • geometry(_:disjointTo:)
  • geometry(_:intersects:)
  • geometry(_:overlapsGeometry:)
  • geometry(_:touchesGeometry:)
  • geometry(_:within:)
If the method returns true, the relationship exists.


In this topic
  1. Description