主题多元可视化(3D)

尝试一下在线预览

此示例使用记录的飓风位置来演示如何使用  SceneView 中的 3D 符号在单个渲染器中可视化多个数据属性。 在这种情况下, PointSymbol3D 与 ObjectSymbol3DLayer 中的带有 primitive 圆锥结合使用,以象征风速和压力。

颜色 用来显示大气压力,每个圆锥的 高度 以节表示风速。

                                 
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
const renderer = {
  type: "simple", // autocasts as new SimpleRenderer()
  symbol: {
    // symbol type required for rendering point geometries
    type: "point-3d", // autocasts as new PointSymbol3D()
    symbolLayers: [
      {
        // renders points as volumetric objects
        type: "object", // autocasts as new ObjectSymbol3DLayer()
        resource: { primitive: "cone" }, // renders points as cones
        width: 50000
      }
    ]
  },
  visualVariables: [
    {
      type: "color",
      field: "PRESSURE", // field containing data for atmospheric pressure
      stops: [{ value: 950, color: "red" }, { value: 1020, color: "blue" }]
    },
    {
      type: "size",
      field: "WINDSPEED", // field containing data for wind speed
      stops: [{ value: 20, size: 60000 }, { value: 150, size: 500000 }],
      axis: "height"
    },
    {
      type: "size",
      axis: "width-and-depth",
      useSymbolValue: true // uses the width value defined in the symbol layer (50,000)
    }
  ]
};

大小 视觉变量的 axis 属性指示如何定义每个要素的大小。 width-and-depth 尺寸变量用于设置每个圆锥底部的恒定直径。 另一方面, height 大小变量使用 WINDSPEED 字段的值来确定高度在 60 到 500 公里之间的大小。

其他可视化教程和示例

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