Locate Outliers (3D Analyst)
Summary
Identifies anomalous elevation measurements from terrain, TIN, or LAS datasets that exceed a defined range of elevation values or have slope characteristics that are inconsistent with the surrounding surface.
Usage
-
Both the Apply Hard Limit and the Apply Comparison Filter option can be applied for outlier detection.
Note:When both filters are enabled, the hard limit is applied first.
Consider using the Apply Hard Limit option when the range of valid elevation values for the surface is known. Point elevation measurements that fall outside of the range defined by the Absolute Z Minimum and Absolute Z Maximum values will be created in the output.
Consider using the Apply Comparison Filter option to locate data points that exceed a height or slope difference relative to neighboring measurements. Each data point is tested for height and slope variances with its natural neighbors. The Exceed Tolerance Ratio is used to determine the number of points in the neighborhood of the test point for which the slope or height tolerance must be exceeded in order for a point to be considered an outlier.
- For any given point having X number of nodes 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.
The Outlier Cap limits the number of points that can be written to the output. Once this limit has been reached, the tool returns a warning and stops finding outliers.
The output points will be attributed with an integer field named REASON whose values identify the outlier identification criteria that resulted in the inclusion of the point measurement.
- 0—Hard limit
- 1—Hard limit and comparison filter
- 2—Comparison filter
To eliminate the outlier points from a terrain dataset, consider using the Delete Terrain Points tool with the outlier points specified in the Area of Interest parameter.
Consider reclassifying outlier points identified in a LAS dataset as noise by using the Set LAS Class Codes Using Features tool.
Syntax
Parameter | Explanation | Data Type |
in_surface |
The terrain, TIN, or LAS dataset that will be analyzed. | LAS Dataset Layer; Terrain Layer; TIN Layer |
out_feature_class |
The output feature class. | Feature Class |
apply_hard_limit (Optional) | Specifies use of 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. | Double |
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. | Double |
apply_comparison_filter (Optional) |
The comparison filter consists of three parameters for determining outliers (z_tolerance, slope_tolerance, and exceed_tolerance_ratio).
| Boolean |
z_tolerance (Optional) |
Used to compare Z values of neighboring points if the comparison filter is applied. The default is 0. | Double |
slope_tolerance (Optional) |
The threshold of slope variance between consecutive points that would be used to identify outlier points. Slope is expressed as a percentage, with the default being 150. | Double |
exceed_tolerance_ratio (Optional) |
Defines the criteria for determining each outlier point as a function of the ratio of points in its natural neighborhood that must exceed the specified comparison filters. For example, the default value of 0.5 means at least half of the points surrounding the query point must exceed the comparison filters for the query point to be flagged as an outlier. A value of 0.7 means at least 70 percent of the neighbor points must exceed the tolerances. | Double |
outlier_cap (Optional) |
The maximum number of outlier points that can be written to the output. Once this value is reached, no further outliers are sought. The default is 2,500. | Long |
Code Sample
The following sample demonstrates the use of this tool in the Python window:
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 sample demonstrates the use of this tool in a stand-alone Python 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)