Locate Outliers (3D Analyst)
Summary
Locates points which appear to be anomalies when compared to a surface. These points represent points that may be blunders and may need to be eliminated from the creation of the surface.
Usage
- A feature class is created and populated with copied points that participate in the input surface. These points have been flagged as outliers according to the user-specified criteria. Outliers are points which might appear to have an elevation or cause a slope which is inconsistent with that which is expected.
- If the Apply Hard Limit option is selected and not the Apply Comparison Filter option, then all points which fall outside of the range specified by the user in Absolute Z minimum and Absolute Z Maximum will be output.
- If the Apply Hard Limit option and also the Apply Comparison Filter option, then both criteria are applied.
- For any given point having n connected points (nodes of a TIN, connected by triangle edges), if the slope from it to a connected point is greater than the Slope Tolerance in m points (where m is n times the Exceed Tolerance Ratio), then the point is written to the output.
- Once the number of points written to the output reaches the Outlier Cap limit, then no more points will be written out.
Syntax
Parameter | Explanation | Data Type |
in_surface |
The input TIN or terrain dataset. | TIN Layer; Terrain Layer |
out_feature_class |
The output feature class. | Feature Class |
apply_hard_limit (Optional) |
Whether to use the absolute Z minimum and maximum to find outliers.
| Boolean |
absolute_z_min (Optional) |
If hard limits are applied, then any point with an elevation below this value will be considered as being an outlier. The default is 0. | Linear unit |
absolute_z_max (Optional) |
If hard limits are applied, then any point with an elevation above this value will be considered as being an outlier. The default is 0. | Linear unit |
apply_comparison_filter (Optional) |
The comparison filter consists of three parameters for assessing the points to determine if they are outliers—whether to use the following three parameters (Z Tolerance, Slope Tolerance, and Exceed Tolerance Ratio) in assessing points.
| Boolean |
z_tolerance (Optional) |
Used to compare Z values of neighboring points, if the comparison filter is applied. The default is 0. | Linear unit |
slope_tolerance (Optional) |
The slope threshold between consecutive points. Expressed as a percentage. The default is 150. | Double |
exceed_tolerance_ratio (Optional) |
The maximum tolerance. The default is 0.5. | Double |
outlier_cap (Optional) |
The maximum number of outlier points that have been output. Once this value is reached no further outliers are sought. The default is 2500. | Long |
Code Sample
The following Python Window script demonstrates how to use the Locate Outliers function in immediate mode.
import arcpy from arcpy import env arcpy.CheckOutExtension("3D") env.workspace = "C:/data" arcpy.LocateOutliers_3d("tin", "outliers.shp", "NO_APPLY_HARD_LIMIT", 0, 0, "APPLY_COMPARISON_FILTER", 0, 150, 0.5, 2500)
The following Python script demonstrates how to use the Locate Outliers function in a stand-alone script.
'''********************************************************************** Name: Delete Terrain Outliers Description: Uses Locate Outliers to identify outlier points in a terrain dataset, and eliminates the outliers from the terrain with Delete Terrain Points. **********************************************************************''' # Import system modules import arcpy import exceptions, sys, traceback from arcpy import env try: arcpy.CheckOutExtension('3D') # Set Local Variables env.workspace = 'C:/data' terrain = 'test.gdb/featuredataset/sample_terrain' terrainPt = 'elevation_pts' # name of terrain point data source outliers = 'in_memory/outliers' # Execute LocateOutliers arcpy.ddd.LocateOutliers(terrain, outliers, 'APPLY_HARD_LIMIT', -10, 350, 'APPLY_COMPARISON_FILTER', 1.2, 120, 0.8, 8000) # Execute Delete Terrain Points arcpy.ddd.DeleteTerrainPoints(terrain, terrainPt, outliers) arcpy.CheckInExtension('3D') except arcpy.ExecuteError: print arcpy.GetMessages() except: # Get the traceback object tb = sys.exc_info()[2] tbinfo = traceback.format_tb(tb)[0] # Concatenate error information into message string pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\ .format(tbinfo, str(sys.exc_info()[1])) msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2)) # Return python error messages for script tool or Python Window arcpy.AddError(pymsg) arcpy.AddError(msgs)