Select features using spatial relationships


Purpose
This sample demonstrates how to use a spatial filter and the relation enumerator to select features based on the existence (or lack of existence) of intersections between the interior, exterior, and boundary of a search graphic and the members of a feature class. By adjusting the tested relationships, all the other spatial relation enumerators can be duplicated and other relationships explored.
This application uses the following information:
  • Location of an input dataset
  • Name of the input dataset

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio.
  2. Run the application. Results are written to the console.


Download the files for Java
geodatabase/SelectFeatures.java Main class.




Additional Requirements
  • US States and Counties data (recommended)

Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic