com.esri.arcgis.geoprocessing.tools.coveragetools
Class Clean
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.coveragetools.Clean
- All Implemented Interfaces:
- GPTool
public class Clean
- extends AbstractGPTool
Generates a coverage with correct polygon or arc–node topology. To do this, Clean edits and corrects geometric coordinate errors, assembles arcs into polygons, and creates feature attribute information for each polygon or arc (that is, creates a PAT or AAT).
The Clean tool is contained in the Coverage Tools tool box.
Usage tips:
- While processing, Clean:
- Finds intersections between arcs, splits the arcs, and codes the intersections as nodes (arc endpoints).
- Merges coordinates within the fuzzy tolerance of each other. Because the fuzzy tolerance actually moves arc vertices, understanding its relationship to coverage resolution is important.
- Creates the list of arcs that defines each polygon's boundary, numbers the nodes, and establishes the From-node and To-node for each arc as well as the internal polygon numbers to the left and right of each arc.
- Deletes dangling arcs that are shorter than the specified dangle length.
- Builds a polygon attribute table (PAT) or an arc attribute table (AAT), depending on the option used. It calculates the area and perimeter for each polygon and stores this information along with the polygon internal number and User-ID in the PAT. If the input coverage already has a PAT, the polygon's original internal number is used to join any additional items in the PAT to the output coverage PAT.
- If the Input Coverage has either PAT or AAT feature attribute tables, they are automatically updated in the Output Coverage for the POLY option. Only the AAT will be updated when using the LINE option. The internal number of each Input Coverage feature is used to relate attribute information from the Input Coverage feature attribute table to the Output Coverage to ensure that the attributes are properly joined to the output feature attribute tables. Feature User-IDs do not have to be unique to ensure that each input feature keeps its attributes in the Output Coverage.
- Do not run Clean on a geographic coverage. Geographic coverages have units in decimal degrees, decimal seconds, radians, and so on. These units are designed to measure angles; they do not measure distances. They represent a spherical coordinate system and should not be confused with a 2D rectilinear coordinate system upon which commands like Clean, , , and other overlay processes are designed to work. You must first your geographic coverage to a suitable projection to convert your angles of latitude and longitude using angular units to a 2D rectilinear Cartesian coordinate system using rectilinear units of Feet, Meters, Kilometers, and so on.
- Clean requires free disk space approximately 13 times the size of your input coverage to create temporary scratch files. These scratch files are created in your current workspace by default. You can override the default and have the scratch files created in another directory by setting the ARCTMPDIR variable. You must have write access to this directory.
- Polygon label points are not required by the Clean command but must be used if you want nonzero User-IDs for polygons. Polygons that contain no label points are assigned a User-ID of zero in Clean.
- Before Clean , place only one label point in each polygon. If a polygon contains more than one label point, one of the label points in the polygon is arbitrarily chosen to assign the User-ID. Even though one label point is chosen for User-ID assignment, other label points are not removed by Clean.
- Clean with the POLY option creates one additional polygon called the background or universe polygon. It is always given polygon internal number 1, and its area is the total sum of the areas of all other polygons in the coverage. It is shown as a negative AREA in the PAT.
- The and for the Output Coverage are set and verified by Clean.
- The is used by the Clean tool. This is the distance the Clean tool is allowed to move features, to eliminate duplicate nodes, create nodes at intersections of lines, and eliminate duplicate features. The fuzzy tolerance is measured in coverage units. When using the Clean tool it is critical that an appropriate fuzzy tolerance be assigned, so that necessary features are not eliminated by mistake.
- The POLY and LINE options with Clean will update the SEC and RAT with adjustments for splitting and arc renumbering. However, any routes or sections attached to arcs merged away by Fuzzy Tolerance are deleted.
- Route systems in the Input Coverage will be maintained in the Output Coverage as long as each route has a unique User-ID.
- Clean cannot be executed on a region coverage that contains unclosed regions. Clean will stop execution upon detecting the first unclosed region.
- Clean with the LINE option does not maintain any region subclass information (topology or attribute). The LINE option deletes the .PAT and the .PATsubclass files.
- Clean with the POLY option maintains region topology. If preliminary region topology exists, Clean will create region topology by creating a .PAT and a .PATsubclass.
- Clean copies Input Coverage annotation to the Output Coverage.
- Links are not maintained after Clean has been executed.
- Clean will update the NAT if it exists in the Input Coverage. New nodes will have their attributes set to zero.
- Clean will update any SECs if they exist in the Input Coverage. Sections on arcs that are split are also split, and the measures on these arcs are updated.
- Do not use Clean on a COGO coverage. Any arcs that are split by Clean will not have their COGO attributes updated. For example, an arc with a DISTANCE item value of 100 that is split by Clean will give the two new arcs DISTANCE values of 100. Use the tool instead and resolve any overlapping arcs in the COGO editing environment.
- If you copy a double precision coverage to a single precision coverage, you must Clean the Output Coverage to rebuild polygon topology.
- On single precision coverages, Clean calculates a minimum tolerance based on the mathematical precision of the coverage (the width of the BND and the number of decimal places). If the calculated minimum tolerance is greater than the Fuzzy Tolerance entered on the command line, the calculated minimum tolerance is used.
- The coordinate precision of the Output Coverage is determined by the current processing rule as set by the Precision for environment setting. If the processing rule has not been established during the current session, then the processing rule will be HIGHEST. This means that Clean will create an Output Coverage in the same precision as the Input Coverage.
- The projection file (PRJ) will be copied to the Output Coverage.
Constructor Summary |
Clean()
Creates the Clean tool with defaults. |
Clean(Object inCover)
Creates the Clean tool with the required parameters. |
Clean
public Clean()
- Creates the Clean tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
Clean
public Clean(Object inCover)
- Creates the Clean 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:
inCover
- the coverage to be cleaned.
getInCover
public Object getInCover()
- Returns the Input Coverage parameter of this tool .
This parameter is the coverage to be cleaned.
This is a required parameter.
- Returns:
- the Input Coverage
setInCover
public void setInCover(Object inCover)
- Sets the Input Coverage parameter of this tool .
This parameter is the coverage to be cleaned.
This is a required parameter.
- Parameters:
inCover
- the coverage to be cleaned.
getOutCover
public Object getOutCover()
- Returns the Output Coverage parameter of this tool .
This parameter is the coverage created by Clean. If the Input Coverage and the Output Coverage have the same name, the Input Coverage will be replaced. By default, the Input Coverage is replaced.
This is an optional parameter.
- Returns:
- the Output Coverage
setOutCover
public void setOutCover(Object outCover)
- Sets the Output Coverage parameter of this tool .
This parameter is the coverage created by Clean. If the Input Coverage and the Output Coverage have the same name, the Input Coverage will be replaced. By default, the Input Coverage is replaced.
This is an optional parameter.
- Parameters:
outCover
- the coverage created by Clean. If the Input Coverage and the Output Coverage have the same name, the Input Coverage will be replaced. By default, the Input Coverage is replaced.
getDangleLength
public double getDangleLength()
- Returns the Dangle Length parameter of this tool .
This parameter is the minimum length allowed for dangling arcs in the Output Coverage. A dangling arc is an arc that has the same polygon internal number on its left and right sides and ends at a dangling node. Dangling arcs are removed for both the POLY and LINE options. If the Dangle Length is not provided, the dangle length is read from the coverage TOL file if the TOL file exists;otherwise, dangle length is set to zero (the default).
This is an optional parameter.
- Returns:
- the Dangle Length
setDangleLength
public void setDangleLength(double dangleLength)
- Sets the Dangle Length parameter of this tool .
This parameter is the minimum length allowed for dangling arcs in the Output Coverage. A dangling arc is an arc that has the same polygon internal number on its left and right sides and ends at a dangling node. Dangling arcs are removed for both the POLY and LINE options. If the Dangle Length is not provided, the dangle length is read from the coverage TOL file if the TOL file exists;otherwise, dangle length is set to zero (the default).
This is an optional parameter.
- Parameters:
dangleLength
- the minimum length allowed for dangling arcs in the Output Coverage. A dangling arc is an arc that has the same polygon internal number on its left and right sides and ends at a dangling node. Dangling arcs are removed for both the POLY and LINE options. If the Dangle Length is not provided, the dangle length is read from the coverage TOL file if the TOL file exists;otherwise, dangle length is set to zero (the default).
getFuzzyTolerance
public double getFuzzyTolerance()
- Returns the Fuzzy Tolerance parameter of this tool .
This parameter is the minimum distance between coordinates in each out_cover.
This is an optional parameter.
- Returns:
- the Fuzzy Tolerance
setFuzzyTolerance
public void setFuzzyTolerance(double fuzzyTolerance)
- Sets the Fuzzy Tolerance parameter of this tool .
This parameter is the minimum distance between coordinates in each out_cover.
This is an optional parameter.
- Parameters:
fuzzyTolerance
- the minimum distance between coordinates in each out_cover.
getFeatureType
public String getFeatureType()
- Returns the Feature Type parameter of this tool .
This parameter is specifies whether to create polygon topology and a PAT or arc–node topology and an AAT. POLY is the default option. If POLY is used on a coverage that has an existing AAT, Clean will also automatically rebuild the AAT.
This is an optional parameter.
- Returns:
- the Feature Type
setFeatureType
public void setFeatureType(String featureType)
- Sets the Feature Type parameter of this tool .
This parameter is specifies whether to create polygon topology and a PAT or arc–node topology and an AAT. POLY is the default option. If POLY is used on a coverage that has an existing AAT, Clean will also automatically rebuild the AAT.
This is an optional parameter.
- Parameters:
featureType
- specifies whether to create polygon topology and a PAT or arc–node topology and an AAT. POLY is the default option. If POLY is used on a coverage that has an existing AAT, Clean will also automatically rebuild the AAT.
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