Locate Outliers (3D Analyst)

License Level:BasicStandardAdvanced

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

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 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.

  • 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.

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).

  • APPLY_COMPARISON_FILTERUse the three comparison 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.

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

LocateOutliers example 1 (Python window)

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)
LocateOutliers example 2 (stand-alone script)

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)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst
11/8/2012