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.

Learn more about how Locate Outliers (3D Analyst) works

Usage

Syntax

LocateOutliers_3d (in_surface, out_feature_class, {apply_hard_limit}, {absolute_z_min}, {absolute_z_max}, {apply_comparison_filter}, {z_tolerance}, {slope_tolerance}, {exceed_tolerance_ratio}, {outlier_cap})
ParameterExplanationData 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.

  • APPLY_HARD_LIMITUse the absolute Z minimum and maximum to find outliers.
  • NO_APPLY_HARD_LIMITDo not use the absolute Z minimum and maximum to find outliers. This is the default.
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.

  • APPLY_COMPARISON_FILTERUse the following three parameters (Z tolerance, slope tolerance, and exceed tolerance ratio) in assessing points. This is the default.
  • NO_APPLY_COMPARISON_FILTERDo not use the three comparison 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

Locate Outliers Example 1 (Python window)

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)
Locate Outliers Example 2 (stand-alone script)

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)

Environments

Related Topics

Licensing Information

ArcView: Requires 3D Analyst
ArcEditor: Requires 3D Analyst
ArcInfo: Requires 3D Analyst

6/10/2013