ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasDatasetLayer Class / SetElevationRangeFilter Method / SetElevationRangeFilter(Double,Double) Method
Minimum Z value.
Maximum Z value.
Example

In This Topic
    SetElevationRangeFilter(Double,Double) Method
    In This Topic
    Sets the elevation range filter with a specific minimum and maximum Z value. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void SetElevationRangeFilter( 
       double minZ,
       double maxZ
    )
    Public Overloads Sub SetElevationRangeFilter( _
       ByVal minZ As Double, _
       ByVal maxZ As Double _
    ) 

    Parameters

    minZ
    Minimum Z value.
    maxZ
    Maximum Z value.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    If either the minZ or maxZ are set to System.Double.NaN then the elevation range values are set to System.Double.MinValue and System.Double.MaxValue respectively.
    Example
    Elevation Range Filter
    {
      // get the state of the current elevation range filter
      var isEnabled = lasDatasetLayer.IsElevationRangeFilterEnabled;
    
      // turn off the filter
      lasDatasetLayer.SetElevationRangeFilterEnabled(false);  // or true to turn it on
    
      // get the current elevation range filter and access the values
      var elevRangeFilter = lasDatasetLayer.GetElevationRangeFilter();
      isEnabled = elevRangeFilter.IsEnabled;
      var minZ = elevRangeFilter.MinZ;
      var maxZ = elevRangeFilter.MaxZ;
    
      // get minimum and maximum Z values from the LAS Dataset
      (minZ, maxZ) = lasDatasetLayer.GetElevationRangeFromDatasetExtent();
    
      // set the elefvation range filter values
      //  note this doesn't change the enabled state of the elevation range filter
      lasDatasetLayer.SetElevationRangeFilter(1.2, 4.5);
    
      // or set the elevation range filter using a LasPointElevationRangeFilter
      elevRangeFilter = new LasPointElevationRangeFilter(true, 1.2, 4.5);
      lasDatasetLayer.SetElevationRangeFilter(elevRangeFilter);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.8 or higher.
    See Also