Geoprocessing field mapper

This sample demonstrates how to set up field mapping for tools such as Merge, Table to Table, FeatureClass to FeaturecCass, and Append.
In this sample, a table containing U.S. census data is converted to a new table. One of the input attributes in the input table is a text field called FIPS. The 11-digit value of this field is a unique identifier for all census tracts in the U.S. The value can be broken down into the following components:
  • The first two digits provide the state code
  • The next three digits indicate the county
  • The final six digits identify the census tract
For example, the value 36089991200 represents the census tract (991200) containing the State University of New York at Potsdam in upstate New York (36), in the county of St. Lawrence (089).
This sample converts this table and creates a field called TRACTID, because the input data only has the FIPS attribute. To do this, the GPFieldMapping object is initialized using the AddTable method to enter the input table. Then the default IGPFieldMapping object is modified by creating an IGPFieldMap object, populating its properties, and adding them to the IGPFieldMapping object.

How to use

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

  1. Run the MapFields application.
  2. Examine output messages on the console.

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/ Main class

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