Intro to WCSLayer

Explore in the sandboxView live

This sample shows how to add an instance of WCSLayer to a Map in a MapView. The WCSLayer contains global sea temperature data.

The RasterStretchRenderer is applied to the layer to change the data visualization. The multidimensionalDefinition property is also set on the layer to request a specific slice.

                                                
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
41
42
43
44
45
46
47
48
// raster stretch renderer with 3 standard-deviations
// and with a multipart color ramps
const renderer = {
  type: "raster-stretch",
  stretchType: "standard-deviation",
  statistics: [[-3, 37, 1, 1]],
  numberOfStandardDeviations: 3,
  colorRamp: {
    type: "multipart",
    colorRamps: [
      {
        fromColor: [0, 0, 255],
        toColor: [0, 255, 255]
      },
      {
        fromColor: [0, 255, 255],
        toColor: [255, 255, 0]
      },
      {
        fromColor: [255, 255, 0],
        toColor: [255, 0, 0]
      }
    ]
  }

// multi dimension definition for the layer
const multidimensionalDefinition = [
  {
    variableName: "water_temp",
    dimensionName: "StdTime",
    values: [1396828800000] // Monday, April 7, 2014 12:00:00 AM GTM
  },
  {
    variableName: "water_temp", // water temp at sea level
    dimensionName: "StdZ",
    values: [0]
  }
];

// WCSLayer from ArcGIS Server
layer = new WCSLayer({
  url:
    "https://sampleserver6.arcgisonline.com/arcgis/services/ScientificData/SeaTemperature/ImageServer/WCSServer",
  renderer: renderer,
  multidimensionalDefinition: multidimensionalDefinition,
  version: "2.0.1",
  opacity: 0.5,
});

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