ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasUniqueValueRendererDefinition Class / LasUniqueValueRendererDefinition Constructor / LasUniqueValueRendererDefinition Constructor(LasAttributeType,Boolean,CIMSymbolReference,Double,CIMColorRamp)
The attribute to define the unique values.
(Optional) Flag indicating whether or not to modulate using intensity.
(Optional) Symbol template for the classes.
(Optional) The symbol scale factor assigned to the symbols. Valid values are between -4.0 and 4.0.
(Optional) Color ramp to apply to those classes.
Example

In This Topic
    LasUniqueValueRendererDefinition Constructor(LasAttributeType,Boolean,CIMSymbolReference,Double,CIMColorRamp)
    In This Topic
    Creates a unique value renderer definition to draw points in a LAS dataset layer.
    Syntax

    Parameters

    attributeType
    The attribute to define the unique values.
    modulateUsingItensity
    (Optional) Flag indicating whether or not to modulate using intensity.
    symbolTemplate
    (Optional) Symbol template for the classes.
    symbolScaleFactor
    (Optional) The symbol scale factor assigned to the symbols. Valid values are between -4.0 and 4.0.
    colorRamp
    (Optional) Color ramp to apply to those classes.
    Remarks
    Only the following values are valid for attributeType - LasAttributeType.Classification, LasAttributeType.ReturnNumber, LasAttributeType.NumberOfReturns, LasAttributeType.PointSourceID or LasAttributeType.UserData.

    The symbol size is calculated as Math.Pow(2, symbolScaleFactor).

    Example
    LAS Points Classification Unique Value Renderer
    // applies to LAS dataset layers only
    
    var lasPointsClassificationRendererDef = new LasUniqueValueRendererDefinition(LasAttributeType.Classification);
    // accept the defaults for color ramp, symbolTemplate, symbol scale factor
    
    var lasDatasetLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<LasDatasetLayer>().FirstOrDefault();
    if (lasDatasetLayer == null)
      return;
    
    if (lasDatasetLayer.CanCreateRenderer(lasPointsClassificationRendererDef))
    {
      CIMTinRenderer renderer = lasDatasetLayer.CreateRenderer(lasPointsClassificationRendererDef);
      if (lasDatasetLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Points))
        lasDatasetLayer.SetRenderer(renderer, SurfaceRendererTarget.Points);
    }
    LAS Points Returns Unique Value Renderer
    // applies to LAS dataset layers only
    
    var lasPointsReturnsRendererDef = new LasUniqueValueRendererDefinition(LasAttributeType.ReturnNumber);
    lasPointsReturnsRendererDef.ModulateUsingIntensity = true;
    lasPointsReturnsRendererDef.SymbolScaleFactor = 1.0;
    // accept the defaults for color ramp, symbolTemplate
    
    if (lasDatasetLayer.CanCreateRenderer(lasPointsReturnsRendererDef))
    {
      CIMTinRenderer renderer = lasDatasetLayer.CreateRenderer(lasPointsReturnsRendererDef);
      if (lasDatasetLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Points))
        lasDatasetLayer.SetRenderer(renderer, SurfaceRendererTarget.Points);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also