com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class Merge
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.Merge
- All Implemented Interfaces:
- GPTool
public class Merge
- extends AbstractGPTool
Combines input features from multiple input sources (of the same
The Merge tool is contained in the Data Management Tools tool box.
Software restrictions: none
Illustration:
Usage tips:
- Use Merge when there are features from multiple input sources that need to be combined into one feature class.
- Input data sources need not be adjacent; ; overlap is allowed.
- The type of input data, such as polygons or tables, must be the same for all inputs.
- If no coordinate system; is specified in the Environment Settings, the output feature class will be in the coordinate system of the first feature class in the input features list.
- Current map layers may be used to define input features. When using layers, only the currently selected features are used in the Merge operation.
- Merge cannot use multiple input layers; of the same name. Although ArcMap allows for the display of layers with the same name (from different directories) these may not be used in the Merge tool. For example, although c:\roads and d:\redlands\roads are two distinct datasets; (located in different workspaces), both will appear in ArcMap with the same name (Roads).
- Fields; of type BLOB; can only be passed into fields of type BLOB. BLOB field values can't be passed into any other data type.
- Output fields and their contents can be controlled by the Field Map option;
- The order in which you select fields determines the order in which their values will be displayed in the output field. When joining several input fields into a single output field, the output fields' values will be generated based on the order the input fields were chosen.
- A new output field can be added to the output feature class or table, composed of user-specified input fields.
- A single output field can be generated from multiple input fields. This happens, if more than one input feature class or table contains a field of the same name, or it can happen, if a new field is created and the contents of the output field are generated from multiple (differently named) user-selected fields.
- The first input feature classes' or tables' fields will appear first as sub fields in the Field Map.
- Merge identifies fields based on their name, not on their data type. Input fields are identified by their name and grouped into an output field of the same name.
- The data type of an output field will default to the same as the data type of the first input field (of that name) it encounters. The data type may be changed manually at any time to any valid data type. All valid data types will be listed if the tools dialog box is used.
- Merge does not perform edge matching. There will be no adjustment to the boundaries of features. Edge matching can be performed in ArcMap or ArcINFO Workstation only.
- Unlike the Union; function, Merge does not planarize the input features into a single output. Input features from all the input feature classes remain intact in the target feature class.
- When performing a Join (Merge rule), you can specify your own delimiter such as a space, comma, period, dash, and so on. If you want to use a space, make sure your mouse pointer is at the start of the input box and click the space bar once.
- Concatenation can happen only if the fields chosen are from the same input feature class or table.
- There are a number of Merge rules available: first, last, join, sum, mean, median, min, max and standard deviation.
- Format options are only available on input fields of type text (and in conjunction with the Join merge rule). You can specify start point, end point, and so on. Format allows you to apply your changes to the selected input field or to apply them to all occurrences of the same input field.
- Standard deviation should not be performed on a single input because values can't be divided by zero, so standard deviation is not a valid option for single inputs. The Merge tool, however, will not fail if standard deviation is chosen for an output field that only has a single input field. In this instance, a value of zero (0) will be entered in the rows of the output field.
- Learn more about using the field map control;
- Learn more about mapping fields in scripts.;
- Learn more about spatial reference and geoprocessing;
- Learn more about ArcGIS data types;
- The following environment affects this tool: Extent; and workspace;
|
Constructor Summary |
Merge()
Creates the Merge tool with defaults. |
Merge(Object inputs,
Object output)
Creates the Merge tool with the required parameters. |
Merge
public Merge()
- Creates the Merge tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
Merge
public Merge(Object inputs,
Object output)
- Creates the Merge tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inputs - Table View, the input point, line, or polygon feature classes or tables that will be merged together.output - Feature Class | Table, the output point, line, or polygon feature class or table that will contain all merged input features.
getInputs
public Object getInputs()
- Returns the Input Datasets parameter of this tool .
This parameter is Table View, the input point, line, or polygon feature classes or tables that will be merged together.
This is a required parameter.
- Returns:
- the Input Datasets
setInputs
public void setInputs(Object inputs)
- Sets the Input Datasets parameter of this tool .
This parameter is Table View, the input point, line, or polygon feature classes or tables that will be merged together.
This is a required parameter.
- Parameters:
inputs - Table View, the input point, line, or polygon feature classes or tables that will be merged together.
getOutput
public Object getOutput()
- Returns the Output Dataset parameter of this tool .
This parameter is Feature Class | Table, the output point, line, or polygon feature class or table that will contain all merged input features.
This is a required parameter.
- Returns:
- the Output Dataset
setOutput
public void setOutput(Object output)
- Sets the Output Dataset parameter of this tool .
This parameter is Feature Class | Table, the output point, line, or polygon feature class or table that will contain all merged input features.
This is a required parameter.
- Parameters:
output - Feature Class | Table, the output point, line, or polygon feature class or table that will contain all merged input features.
getFieldMappings
public Object getFieldMappings()
- Returns the Field Map parameter of this tool .
This parameter is Field Mappings, for each Field Map, you can add, rename, or delete output fields as well as set properties such as data type and merge rule. You can also delete an output field's sub fields, and you can format any output field's values if the data type is text.
This is an optional parameter.
- Returns:
- the Field Map
setFieldMappings
public void setFieldMappings(Object fieldMappings)
- Sets the Field Map parameter of this tool .
This parameter is Field Mappings, for each Field Map, you can add, rename, or delete output fields as well as set properties such as data type and merge rule. You can also delete an output field's sub fields, and you can format any output field's values if the data type is text.
This is an optional parameter.
- Parameters:
fieldMappings - Field Mappings, for each Field Map, you can add, rename, or delete output fields as well as set properties such as data type and merge rule. You can also delete an output field's sub fields, and you can format any output field's values if the data type is text.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias