Skip to content

QueryInput

Example

  {
    "itemFilter": {
      "itemIndices": [0]
    },
    "spatialFilter": {
      "geometry": polygon (wkt)
    },
    "temporalFilter": {
      "type": "TemporalIndexFilter",
      "from": 0,
      "to": 0
    },
    "verticalFilter": null,
    "includeGeometries": true,
    "includeValues": true
  }
  var queryInput = new QueryInput()
  {
      IncludeGeometries = true,
      IncludeValues = true,
      ItemFilter = new ItemFilter() { ItemIndices = new[] { 0, 1 } },
      TemporalFilter = new TemporalIndexFilter() { From = 0, To = 0 },
      VerticalFilter = new VerticalIndexFilter() { From = 0, To = 0 },
      SpatialFilter = new SpatialFilter() { Geometry = bondingBoxWkt }
  };

Spatial filter [required]

Includes geometry as Well Known Text, the value can represent:

  • Polygon POLYGON ((35 10, 46 46, 16 41, 11 21, 35 10))
  • LineString LINESTRING (35 15, 15 35, 45 45)
  • Coordinate List MULTIPOINT (10 40, 40 30, 20 20, 30 10)

Temporal filter valid values [required]

  • TemporalIndexFilter - range of time step indexes
  • TemporalValueFilter - filter by UTC datetime values
  • TemporalIndexListFilter - filter by list of time step indexes

Even when querying multidimensional dataset in Timeseries oriented storage for all time steps, you still need to specify the temporal filter. As of May 2024, there is no shortcut to specify that response should include all time steps. First, get the multidimensional dataset details to obtain the temporal domain. Based on that, specify one type of temporal filter and query the multidimensional dataset for data. All time series in a multidimensional dataset have the same temporal domain so the multidimensional dataset details can be called once even for many subsequent data queries.

Veritcal filter valid values

  • VerticalIndexFilter - range of layer indexes
  • VerticalValueFilter - filter by vertical depth

When querying a 3D mesh dataset with sigma layers in time series oriented storage, use VerticalIndexRange(-1, -1) if you want to get all layers.

Do not provide vertical filter for datasets without layers and full 3D elements.

Item filter [required]

Typically an array of indexes of all the items that should be returned in the response. Item indexes start from 0. A full list of item idexes and their details can be obtained by the multidimensional dataset details endpoint GET​/api​/md/dataset​/{id}​ on api-version 3.

For 3D mesh datasets imported from DFSU files into Timeseries oriented storage, item index 0 refers to the Z-Level item. That is generally not intended for querying. Query items from 1 onwards.

Other options

  • IncludeGeometries - if true, spatial element definitions are returned as array of coordinates (see sample)
  • IncludeValues - if true, data as an array of Datablocks are returned

IncludeGeometries and IncludeValues are intended for improving performance in some use cases. For instance, imagine querying the same dataset multiple times but only TimestepIndex or LayerIndex change in different request. First query could have both IncludeGeometries and IncludeValues set to true. Setting IncludeGeometries = false in all subsequent queries will reduce the response size. Note that at least 1 of the IncludeGeometries, IncludeValues parameters must be true.