com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class MakeFeatureLayer
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.MakeFeatureLayer
- All Implemented Interfaces:
- GPTool
public class MakeFeatureLayer
- extends AbstractGPTool
The Make Feature Layer tool is used to create a
The Make Feature Layer tool is contained in the Data Management Tools tool box.
Software restrictions: none
Usage tips:
- Complex feature classes, such as annotation and dimensions, are not supported by this tool.
- The feature layer can be used as input to any geoprocessing tool that accepts a feature class as input.
- The temporary feature layer can be saved as a layer file using the Save To Layer File; tool or saved as a new feature class using the Copy Features; tool.
- Layers created in ArcCatalog cannot be used in ArcMap unless they are saved to a layer file using the Save To Layer File tool.
- An existing feature layer will be overwritten if the same layer name is specified and if you explicitly state that overwriting outputs is allowed. You can set this option in any application by opening the Tools menu > Options dialog box. On the Geoprocessing tab under the General heading you'll see a checkbox for Overwrite the outputs of geoprocessing operations. Learn more about overwriting geoprocessing tool results; In a script you will need to set the OverwriteOutput method to True. Learn more about the Overwrite Output method;
- If an SQL expression is used but returns nothing, the output feature layer will be empty.
- For further details on the syntax for the Expression parameter, see Building a SQL Expression; or SQL Reference;
- Field names can be given a new name by using the Field Information control. The second column on the control lists the existing field names from the input. To rename a field, click the field name and type in a new one.
- The field names will be validated by specifying an input workspace. Thus, if the input is a geodatabase feature class, and the output workspace is a folder, the field names may be truncated, since shapefile attributes can only have names of ten characters or less. The new names may be reviewed and altered using the Field Information control.
- A subset of fields can be made visible in the new layer by using the Field Information control. The third column in the control provides a dropdown option to specify if a field will be visible or hidden in the new layer. The default is TRUE. Selecting FALSE will hide that field. If the feature layer is saved as a new feature class, only the fields listed as visible will appear in the new output.
- New field names defined in Make Feature Layer will be honored in subsequent tools. However, if Make Feature Layer is the last tool in a model, the field names will be obtained from the source feature class on disk. To maintain new field names, the new feature layer has to be written out to a new feature class using Copy Features or Feature Class to Fetature Class.
- A split policy can be set by using the Field Information control. The fourth column on the control provides a dropdown option to specify a split policy. The default is NONE. This means the attribute of the two resulting features takes on a copy of the original object's attribute value. Selecting RATIO means the attributes of the resulting features are a ratio of the original feature's value. The ratio is based on the ratio in which the original geometry is divided. If the geometry is divided equally, each new feature's attribute gets one-half the value of the original object's attribute.
- No environment settings affect this tool.
MakeFeatureLayer
public MakeFeatureLayer()
- Creates the Make Feature Layer tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
MakeFeatureLayer
public MakeFeatureLayer(Object inFeatures,
Object outLayer)
- Creates the Make Feature Layer 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:
inFeatures - Feature Layer, the input feature class or layer. Complex feature classes, such as annotation and dimensions, are not valid inputs to this tool.outLayer - Feature Layer, the name of the feature layer to be created.
getInFeatures
public Object getInFeatures()
- Returns the Input Features parameter of this tool .
This parameter is Feature Layer, the input feature class or layer. Complex feature classes, such as annotation and dimensions, are not valid inputs to this tool.
This is a required parameter.
- Returns:
- the Input Features
setInFeatures
public void setInFeatures(Object inFeatures)
- Sets the Input Features parameter of this tool .
This parameter is Feature Layer, the input feature class or layer. Complex feature classes, such as annotation and dimensions, are not valid inputs to this tool.
This is a required parameter.
- Parameters:
inFeatures - Feature Layer, the input feature class or layer. Complex feature classes, such as annotation and dimensions, are not valid inputs to this tool.
getOutLayer
public Object getOutLayer()
- Returns the Output Layer parameter of this tool .
This parameter is Feature Layer, the name of the feature layer to be created.
This is a required parameter.
- Returns:
- the Output Layer
setOutLayer
public void setOutLayer(Object outLayer)
- Sets the Output Layer parameter of this tool .
This parameter is Feature Layer, the name of the feature layer to be created.
This is a required parameter.
- Parameters:
outLayer - Feature Layer, the name of the feature layer to be created.
getWhereClause
public Object getWhereClause()
- Returns the Expression parameter of this tool .
This parameter is SQL Expression, for more information on SQL syntax and how it differs between data sources, see
This is an optional parameter.
- Returns:
- the Expression
setWhereClause
public void setWhereClause(Object whereClause)
- Sets the Expression parameter of this tool .
This parameter is SQL Expression, for more information on SQL syntax and how it differs between data sources, see
This is an optional parameter.
- Parameters:
whereClause - SQL Expression, for more information on SQL syntax and how it differs between data sources, see
getWorkspace
public Object getWorkspace()
- Returns the Workspace or Feature Dataset parameter of this tool .
This parameter is Workspace | Feature Dataset, feature class and the output workspace is a folder, the field names may be truncated, since shapefile attributes can only have names of ten characters or less. The new names may be reviewed and altered using the Field Information control.
This is an optional parameter.
- Returns:
- the Workspace or Feature Dataset
setWorkspace
public void setWorkspace(Object workspace)
- Sets the Workspace or Feature Dataset parameter of this tool .
This parameter is Workspace | Feature Dataset, feature class and the output workspace is a folder, the field names may be truncated, since shapefile attributes can only have names of ten characters or less. The new names may be reviewed and altered using the Field Information control.
This is an optional parameter.
- Parameters:
workspace - Workspace | Feature Dataset, feature class and the output workspace is a folder, the field names may be truncated, since shapefile attributes can only have names of ten characters or less. The new names may be reviewed and altered using the Field Information control.
getFieldInfo
public Object getFieldInfo()
- Returns the Field Info parameter of this tool .
This parameter is Field Info, the Field Information control is used to review and alter the field names for the new layer. Fields can be hidden, and a split policy can be specified.
This is an optional parameter.
- Returns:
- the Field Info
setFieldInfo
public void setFieldInfo(Object fieldInfo)
- Sets the Field Info parameter of this tool .
This parameter is Field Info, the Field Information control is used to review and alter the field names for the new layer. Fields can be hidden, and a split policy can be specified.
This is an optional parameter.
- Parameters:
fieldInfo - Field Info, the Field Information control is used to review and alter the field names for the new layer. Fields can be hidden, and a split policy can be specified.
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