com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class FeatureToLine
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.FeatureToLine
- All Implemented Interfaces:
- GPTool
public class FeatureToLine
- extends AbstractGPTool
Creates a feature class containing lines generated by converting polygon boundaries to lines, or splitting line, polygon, or both features at their intersections.
The Feature To Line tool is contained in the Data Management Tools tool box.
Usage tips:
- Input attributes can optionally be maintained in the output feature class, determined by the Preserve attributes option on the dialog box (the attributes parameter in scripting).
- When multiple feature classes or layers are specified in the list of input features, the order of the entries in the list does not affect the output feature type, but the spatial reference of the top entry on the tool dialog box (the first entry in scripting) in the list will be used during processing and set to the output.
- Where input lines or polygon boundaries touch, cross, or overlap each other at locations other than their start and end vertices, they will be split at those intersections; each of the split lines will become an output line feature. If an input line or polygon boundary is not intersected by another feature, its entire shape will still be written out as a line feature.
- For multipart input features, the output lines will be singlepart.
- For input features that are parametric (true) curves, the output lines will remain true curves even if they are split. This does not apply to shapefile data.
- If the Preserve attributes option on the dialog box is checked (the attributes parameter is set to ATTRIBUTES in scripting), the attributes from all input entries will be maintained in the output in the order they appear in the input list. A new field, FID_xxx, where xxx is the source feature class name of a particular input entry, will be added to the output for each input entry and set to the source feature IDs. The output lines are associated with their attributes in the following ways:
- For coincident lines or polygon boundaries within the same set of input features, for example, the boundary separating two polygons, two line features with identical geometry will be written to the output: each of them will have the attributes of its source feature.
- For coincident lines or polygon boundaries from two different sets of input features, for example, a line overlaping a polygon boundary, only one line feature with the attributes of both source features will be written to the output.
- If an output line does not overlap any feature in a particular input feature set, it will have the value of -1 in the FID_xxx field and zero or null values in the other fields from that feature set.
If the Preserve attributes option on the dialog box is unchecked (the attributes parameter is set to NO_ATTRIBUTES in scripting), none of the input attributes will be maintained in the output feature class; a single line feature will be written to the output for each set of coincident lines or polygon boundaries.
- When input features contain adjacent polygons, to get the shared boundary line with left and right polygon feature IDs as attributes in the output, use the tool instead.
Constructor Summary |
FeatureToLine()
Creates the Feature To Line tool with defaults. |
FeatureToLine(java.lang.Object inFeatures,
java.lang.Object outFeatureClass)
Creates the Feature To Line tool with the required parameters. |
Method Summary |
java.lang.String |
getAttributes()
Returns the Preserve attributes parameter of this tool . |
java.lang.Object |
getClusterTolerance()
Returns the XY Tolerance parameter of this tool . |
java.lang.Object |
getInFeatures()
Returns the Input Features parameter of this tool . |
java.lang.Object |
getOutFeatureClass()
Returns the Output Feature Class parameter of this tool . |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
void |
setAttributes(java.lang.String attributes)
Sets the Preserve attributes parameter of this tool . |
void |
setClusterTolerance(java.lang.Object clusterTolerance)
Sets the XY Tolerance parameter of this tool . |
void |
setInFeatures(java.lang.Object inFeatures)
Sets the Input Features parameter of this tool . |
void |
setOutFeatureClass(java.lang.Object outFeatureClass)
Sets the Output Feature Class parameter of this tool . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FeatureToLine
public FeatureToLine()
- Creates the Feature To Line tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
FeatureToLine
public FeatureToLine(java.lang.Object inFeatures,
java.lang.Object outFeatureClass)
- Creates the Feature To Line 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
- the input features that can be line or polygon, or both.outFeatureClass
- the output line feature class.
getInFeatures
public java.lang.Object getInFeatures()
- Returns the Input Features parameter of this tool .
This parameter is the input features that can be line or polygon, or both.
This is a required parameter.
- Returns:
- the Input Features
setInFeatures
public void setInFeatures(java.lang.Object inFeatures)
- Sets the Input Features parameter of this tool .
This parameter is the input features that can be line or polygon, or both.
This is a required parameter.
- Parameters:
inFeatures
- the input features that can be line or polygon, or both.
getOutFeatureClass
public java.lang.Object getOutFeatureClass()
- Returns the Output Feature Class parameter of this tool .
This parameter is the output line feature class.
This is a required parameter.
- Returns:
- the Output Feature Class
setOutFeatureClass
public void setOutFeatureClass(java.lang.Object outFeatureClass)
- Sets the Output Feature Class parameter of this tool .
This parameter is the output line feature class.
This is a required parameter.
- Parameters:
outFeatureClass
- the output line feature class.
getClusterTolerance
public java.lang.Object getClusterTolerance()
- Returns the XY Tolerance parameter of this tool .
This parameter is the minimum distance separating all feature coordinates, and the distance a coordinate can move in X, Y, or both during spatial computation. The default XY tolerance is set to 0.001 meter or its equivalent in feature units.
This is an optional parameter.
- Returns:
- the XY Tolerance
setClusterTolerance
public void setClusterTolerance(java.lang.Object clusterTolerance)
- Sets the XY Tolerance parameter of this tool .
This parameter is the minimum distance separating all feature coordinates, and the distance a coordinate can move in X, Y, or both during spatial computation. The default XY tolerance is set to 0.001 meter or its equivalent in feature units.
This is an optional parameter.
- Parameters:
clusterTolerance
- the minimum distance separating all feature coordinates, and the distance a coordinate can move in X, Y, or both during spatial computation. The default XY tolerance is set to 0.001 meter or its equivalent in feature units.
getAttributes
public java.lang.String getAttributes()
- Returns the Preserve attributes parameter of this tool .
This parameter is specifies whether to preserve or omit the input attributes in the output feature class.
This is an optional parameter.
- Returns:
- the Preserve attributes
setAttributes
public void setAttributes(java.lang.String attributes)
- Sets the Preserve attributes parameter of this tool .
This parameter is specifies whether to preserve or omit the input attributes in the output feature class.
This is an optional parameter.
- Parameters:
attributes
- specifies whether to preserve or omit the input attributes in the output feature class.
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias