Create Buffer custom Java geoprocessing tool


Purpose
This sample demonstrates how to create a custom Java geoprocessing tool that encapsulates a system geoprocessing tool. This Java tool creates a buffer for a supplied feature class. However, it does not use its own logic to create a buffer; it uses the System Buffer tool that resides in the Analysis toolbox.
 
This sample application cannot be run from the command line or from inside an integrated development environment (IDE). Follow the instructions below to run this application.

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 (createbuffer/lib) and copy CreateBufferExt.jar into the <ArcGIS Desktop Install Dir>/java/lib/ext folder to deploy the custom extension. The extension functionality will become available to you when you restart ArcCatalog.
  2. Open ArcCatalog and expand Toolboxes.
  3. Create a new toolbox under My Toolboxes providing a logical name: CustomGPCreateBuffer.
  4. Right click CustomGPCreateBuffer, hover the mouse over Add, and click Tool. A dialog box opens.
  5. Expand CBFunctionFactory from the list of toolboxes, select CreateBuffer JavaToolset, and click OK.
  6. The Java Create Buffer Tool is added to the CustomGPCreateBuffer toolbox you already created.
  7. In ArcCatalog, double-click the custom tool and provide values for all the parameters.
  8. Click OK to execute the tool.
  9. Examine the results of your new dataset.


Download the files for Java
geoprocessing/customtool/CreateBuffer.java Geoprocessing tool class
geoprocessing/customtool/CBFunctionFactory.java Geoprocessing Function Factory class




Additional Requirements
  • ArcGIS Desktop Installed (ArcCatalog)

Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView