CopyFeatures geoprocessing tool


Purpose
This sample demonstrates the execution of geoprocessing tools—such as MakeFeatureLayer, SelectLayerByLocation, SelectLayerByAttribute, and CopyFeatures—using the GeoProcessor class. The following workflow is implemented using the previously mentioned geoprocessing tools:
  1. Feature layers are created (MakeFeatureLayer tool)
  2. Features are selected using a location-based query (SelectLayerByLocation tool)
  3. Of the features selected, only those features that meet another criteria are selected (SelectLayerByAttribute tool)
  4. All selected features are copied to a new feature class (CopyFeatures tool)
The main purpose of this sample is to demonstrate creating geographic information system (GIS) solutions using coarse-grained geoprocessing tools.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Run the sample.
  2. After the sample executes, examine wellsCopy.shp in the output directory. This shapefile is the output of the CopyFeatures geoprocessing tool, which copies features from the supplied layer.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

geoprocessing/CopyFeaturesFromLayer.java Main class.




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