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 above-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. 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. Run the sample.
  2. After sample execution is complete, examine wellsCopy.shp in the output directory. This shapefile is the output of the CopyFeatures geoprocessing tool, which copies features from the supplied layer.


Download the files for Java
geoprocessing/CopyFeaturesFromLayer.java Main class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView