Skip To Content

Multidimensional Definition

Description

At 10.3, image services support multidimensional data. Information related to variables, dimensions are available in the Multidimensional Info resource.

Multidimensional data maybe filtered by the variable names and dimension values. A dimensional definition defines a filter for one variable and one dimension. A multidimensional definiton is an array of dimensional definition objects: [dimensionalDefinition1, dimensionalDefinition2, ...]

A multidimensionalDefinition parameter is supported by the Query (Image Service) operation, and is part of mosaic rule objects, which is used by many operations such as, Export Image, Identify (Image Service), and Get Samples.

JSON Syntax for Dimensional Definition

{
  "variableName" : "<variableName>", 
  "dimensionName" : "<dimensionName>", 
  "values" : [<value1>, <value2>, ...],//each element can be a single value, or an array of two values (lower and upper bound).
  "isSlice" : <true | false> //default is true. 
}

A dimensional slice can be a single value (this is common), e.g. temperature at a particular time. The variables that have such dimensions maybe filtered by any of the following:

  • Get three slices: t1, t2, and t3: "values": [t1, t2, t3]
  • Get all slices between t1 and t2 (inclusive): "values":[[t1,t2]]
  • Get all slices between t1 and t2 (inclusive) and all slices between t3 and t4 (inclusive): "values":[[t1,t2], [t3,t4]]

A dimensional slice can be an array of two values that defines lower and upper bound, which is not common. For example, average salinity can be measured between a period of time. The variables that have such dimensions maybe filtered by any of the following:

  • Get one slice whose start of measurement is t1 and end of measurement is t2 (Note: If nothing meeting both conditions, no slice is filtered): "values": [[t1, t2]]
  • Get all slices whose start of measurement is on or after t1 OR end of measurement is on or before t2: "values": [[t1, t2]],"isSlice":false

Dimensional Definition JSON Examples

For example, sanlity is a variable and StdZ (depth) is its dimension, each dimensional slice represent the sanlity at a particular depth. The following example filters the data using multiple StdZ(depth) slices:

Filter out Sanlity that has a StdZ of -10, -2, or 0 meters.

{
  "variableName" : "Salinity",
  "dimensionName" : "StdZ",
  "values" : [-10,-2,0]
}

For example, sanlity is a variable and StdZ (depth) is its dimension, each dimensional slice represent the sanlity at a particular depth. The following example filters the data using multiple StdZ (depth) ranges:

Filter out Sanlity that has is between -10 to -5 meters (inclusive) or between -2 to 0 (inclusive) meters

{
  "variableName" : "Salinity",
  "dimensionName" : "StdZ",
  "values" : [[-10,-5],[-2,0]]
}

For example, avgSanlity is a variable and StdTime is its dimension, each dimensional slice represent the average sanlity measured over a period of time—defined by two fields: StdTime and StdTime_Max. The following example filters the data using multiple StdTime slices: the first slice is average salinity between July 24/2014 6:00 to 6:10 GMT, the second slice is average salinity between July 24/2014 18:00 to 18:10 GMT. The translated query (pseudo) is: VariableName = "AvgSalinity" & ((StdTime = 1406181600000 and StdTime_Max = 1406182200000) or (StdTime = 1406224800000 and StdTime_Max = 1406225400000))

{
  "variableName" : "AvgSalinity",
  "dimensionName" : "StdTime",
  "values" : [[1406181600000,1406182200000],[1406224800000,1406225400000]]
}

For example, avgSanlity is a variable and StdTime is its dimension, each dimensional slice represent the average sanlity measured over a period of time—defined by two fields: StdTime and StdTime_Max. The following example filters the data using multiple StdTime ranges: that are either overlap with July 24/2014 6:00 to 6:10 GMT, or overlap with July 24/2014 18:00 to 18:10 GMT. The translated query (pseudo) is: VariableName = "AvgSalinity" & ((StdTime >= 1406181600000 and StdTime_Max <= 1406182200000) or (StdTime >= 1406224800000 and StdTime_Max <=1406225400000))

{
  "variableName" : "AvgSalinity",
  "dimensionName" : "StdZ",
  "values" : [[1406181600000,1406182200000],[1406224800000,1406225400000]],
  "isSlice":false
}

Multidimensional Definition

A multiple dimensional service can have multiple variables and multiple dimensions. Multiple dimensional defintions are usually used to filter data.

A multidimensional definition (multidimensionalDefinition) is an array of dimensional definitions: [dimensionalDefinition1, dimensionalDefinition2, ...]:

Multiple definitions are consolidated by server into one single where clause. The consolidation rule is:

  • For the same variableName but different dimensionName, it uses the AND operator to connect to meet all dimension conditions for the same variable.
  • For different variableName, it uses the OR operator to connect any variable that meets their dimension conditions.

Multidimensional Definition Examples

The following mosaic rule object contains a multidimensional filter that filters a particular slice of Salinity data by time and z.


{
  "mosaicMethod" : "esriMosaicNorthwest",
  "ascending" : true,
  "mosaicOperation" : "MT_FIRST",
  "multidimensionalDefinition:
    [{
     "variableName" : "Salinity",
     "dimensionName" : "StdZ",
     "values" : [-10]
     },{
     "variableName" : "Salinity",
     "dimensionName" : "StdTime",
     "values" : [1406182200000]
    }]
}