PointCloudLayer - 强度的颜色调制

尝试一下在线预览

colorModulation  用于以更真实的方式显示点云的扫描表面,方法是将颜色调整为扫描仪捕捉到的强度值。颜色的亮度随着强度值的降低而降低,创建了更暗的区域,并有助于区分扫描表面的不同部分。

这个示例展示了如何通过使用基于强度的颜色调制从分类的点云数据中获得更多信息。

       
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
};

这个属性可以在任何渲染器上设置,在这个示例中,我们使用了  PointCloudUniqueValueRenderer  ,它根据给定的分类为点分配颜色:

                                   
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
const pcLayer = new PointCloudLayer({
  url: "https://tiles.arcgis.com/tiles/Imiq6naek6ZWdour/arcgis/rest/services/PointCloud_urban/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: "Unassigned",
      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",
      color: [229, 0, 0]
    }]
  })
});

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