Custom Java Geoprocessing Tool - Delete Features


Purpose
This sample demonstrates how to create, deploy, and execute a custom geoprocessing tool developed in Java. The tool featured in this sample deletes features from the specified feature class based on a SQL Expression. This tool, therefore, requires the following parameters: - the feature class from which to delete features from, - the SQL expression that indicates the features to delete. This tool has no special output. It modifies the input feature class.

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. Navigate to this sample's lib folder (deletefeatures/lib) and copy DeleteFeaturesExt.jar into the <ArcGIS Engine Install Dir>/java/lib/ext folder to deploy the custom geoprocessing extension. The extension functionality will be available to the ArcGIS Engine application when it is executed.
  2. Navigate to this sample's bin folder (deletefeatures/bin) and execute the DeleteFeatures.jar to run the console based application (the Eclipse IDE can also be used). This application will execute the custom geoprocessing tool.
  3. Examine the output messages on the console window.


Download the files for Java
geoprocessing/DeleteFeaturesToolRunner.java Main class
geoprocessing/customtool/DeleteFeatures.java Geoprocessing tool class
geoprocessing/customtool/DFFunctionFactory.java Geoprocessing Function Factory class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime