PointCloudLayer - intensity color modulation

colorModulation is used to display scanned surfaces of a point cloud in a more realistic way by adjusting the color to the intensity value captured by the scanner. The brightness of the color is reduced with lower intensity values, creating darker areas and helping to distinguish different parts of the scanned surface.

This sample shows how to get more information from a classified point cloud data by using intensity based color modulation.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
// Intensity values can vary between 0 and 255. The values set here are
// minimum and maximum values of the Intensity field of the point cloud layer.
const colorModulation = {
  field: "INTENSITY",
  minValue: 35, // colors of points with this intensity value will be the darkest
  maxValue: 211 // colors of points with maximum intensity value will be displayed the same
};

This property can be set on any renderer, in this sample we used the PointCloudUniqueValueRenderer which assigns colors to points based on a given classification:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const pcLayer = new PointCloudLayer({
  url: "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/SONOMA_AREA1_LiDAR_RGB/SceneServer",
  renderer: {
    type: "point-cloud-unique-value",  // autocasts as new PointCloudUniqueValueRenderer()
    field: "CLASS_CODE", // field containing data for standard LAS classification
    colorModulation: colorModulation,
    pointsPerInch: 35,
    colorUniqueValueInfos: [
    {
      values: ["1"],
      label: "Unclassified",
      color: [178, 178, 178]
    },
    {
      values: ["2"],
      label: "Ground",
      color: [168, 112, 0]
    },
    {
      values: ["5"],
      label: "High Vegetation",
      color: [205, 245, 121]
    },
    {
      values: ["6"],
      label: "Building",
      color: [229, 75, 65]
    },
    {
      values: ["7"],
      label: "Low Point(noise)",
      color: [229, 0, 0]
    },
    {
      values: ["9"],
      label: "Water",
      color: [0, 92, 230]
    }]
  }
});

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.