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

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

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

Veritcal filter valid values

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

Do not provide vertical filter for datasets without layers.

Other options

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

You can combine IncludeGeometries and IncludeValues for optimal perfomance in your use case.

if you are calling the same query multiple times, e.g changing just TimestepIndex or LayerIndex, you can reduce the reuslt size by setting IncludeGeometries = false

At least 1 of the IncludeGeometries,IncludeValues switches must be set to true.