# Module: ol/source/SentinelHub

This documentation is for OpenLayers v10.9.0. The latest is v.

## ol/source/SentinelHub

### Classes

SentinelHub

### Type Definitions

#### AccessTokenClaims{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `exp` | number | The expiration time of the token (in seconds).

#### AuthConfig{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `tokenUrl` | string (defaults to 'https://services.sentinel-hub.com/auth/realms/main/protocol/openid-connect/token') | The URL to get the authentication token.
  `clientId` | string | The client ID.
  `clientSecret` | string | The client secret.

#### Collections{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `from` | string | undefined | For 'ORBIT' mosaicking, this will be the start of the search interval.
  `to` | string | undefined | For 'ORBIT' mosaicking, this will be the end of the search interval.
  `scenes` | Scenes | The scenes in the collection.

#### CustomData{Object.<string, unknown>}

#### DataFilter{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `timeRange` | TimeRange | undefined | The data time range.
  `maxCloudCoverage` | number | undefined | The maximum cloud coverage (0-100).

#### Evalscript{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `setup` | Setup | The setup function.
  `evaluatePixel` | EvaluatePixel | The function to transform input samples into output values.
  `updateOutput` | UpdateOutput | undefined | Optional function to adjust the output bands.
  `updateOutputMetadata` | UpdateOutputMetadata | undefined | Optional function to update the output metadata.
  `preProcessScenes` | Collections | undefined | Optional function called before processing.
  `version` | string (defaults to '3') | The Evalscript version.

#### EvaluatePixel()

source/SentinelHub.js, line 52

#### InputDescription{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `bands` | Array.<string> | Input band identifiers.
  `units` | string | Array.<string> | undefined | Input band units.
  `metadata` | Array.<string> | undefined | Properties to include in the input metadata.

#### InputMetadata{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `serviceVersion` | string | The version of the service used for processing.
  `normalizationFactor` | number | The factor used to convert digital number (DN) values to reflectance.

#### Options{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `auth` | AuthConfig | string | undefined | The authentication configuration with `clientId` and `clientSecret` or an access token. See Sentinel Hub authentication for details. If not provided in the constructor, the source will not be rendered until `setAuth` is called.
  `data` | Array<ProcessRequestInputDataItem> | undefined | The input data configuration. If not provided in the constructor, the source will not be rendered until `setData` is called.
  `evalscript` | Evalscript | string | undefined | The process applied to the input data. If not provided in the constructor, the source will not be rendered until `setEvalscript` is called. See the `setEvalscript` documentation for details on the restrictions when passing process functions.
  `tileSize` | number | Size (defaults to [512, 512]) | The pixel width and height of the source tiles.
  `url` | string (defaults to 'https://services.sentinel-hub.com/api/v1/process') | The Sentinel Hub Processing API URL.
  `projection` | ProjectionLike | undefined | Projection. Default is the view projection.
  `attributionsCollapsible` | boolean (defaults to true) | Allow the attributions to be collapsed.
  `interpolate` | boolean (defaults to true) | Use interpolated values when resampling. By default, linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
  `wrapX` | boolean (defaults to true) | Wrap the world horizontally.
  `transition` | number | undefined | Duration of the opacity transition for rendering. To disable the opacity transition, pass `transition: 0`.

#### Orbit{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `dateFrom` | string | The earliest date for all scenes included in the tile.
  `dateTo` | string | The latest date for scenes included in the tile.
  `tiles` | Array | Metadata for each tile.

#### OutputDescription{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | string (defaults to 'default') | Output identifier.
  `bands` | number | Number of output bands.
  `sampleType` | SampleType (defaults to 'AUTO') | Output sample type.
  `nodataValue` | number | undefined | Output nodata value.

#### OutputMetadata{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `userData` | Object | Arbitrary user data.

#### OutputValues{Object.<string, Array.<number>>}

#### ProcessRequest{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `input` | ProcessRequestInput | Input data configuration.
  `evalscript` | string | The Evalscript used for processing.
  `output` | ProcessRequestOutput | undefined | The output configuration.

#### ProcessRequestInput{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `bounds` | ProcessRequestInputBounds | The bounding box of the input data.
  `data` | Array<ProcessRequestInputDataItem> | The intput data.

#### ProcessRequestInputBounds{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `bbox` | Array.<number> | undefined | The bounding box of the input data.
  `properties` | ProcessRequestInputBoundsProperties | undefined | The properties of the bounding box.
  `geometry` | module:geojson~Geometry | undefined | The geometry of the bounding box.

#### ProcessRequestInputBoundsProperties{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `crs` | string | The coordinate reference system of the bounding box.

#### ProcessRequestInputDataItem{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `type` | string | undefined | The type of the input data.
  `id` | string | undefined | The identifier of the input data.
  `dataFilter` | DataFilter | undefined | The filter to apply to the input data.
  `processing` | Object.<string, unknown> | undefined | The processing to apply to the input data.

#### ProcessRequestOutput{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `width` | number | undefined | Image width in pixels.
  `height` | number | undefined | Image height in pixels.
  `resx` | number | undefined | Spatial resolution in the x direction.
  `resy` | number | undefined | Spatial resolution in the y direction.
  `responses` | Array<ProcessRequestOutputResponse> | undefined | Response configuration.

#### ProcessRequestOutputFormat{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `type` | string | undefined | The output format type.

#### ProcessRequestOutputResponse{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `identifier` | string | undefined | Identifier used to connect results to outputs from the setup.
  `format` | ProcessRequestOutputFormat | undefined | Response format.

#### Sample{Object.<string, number>}

#### SampleType{'INT8'} {'UINT8'} {'INT16'} {'UINT16'} {'FLOAT32'} {'AUTO'}

#### Scenes{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `orbit` | Array<Orbit> | undefined | Information about scenes included in the tile when 'mosaicking' is 'ORBIT'.
  `tiles` | Array<Tile> | undefined | Information about scenes included in the tile when 'mosaicking' is 'TILE'.

#### Setup()

source/SentinelHub.js, line 48

#### SetupResult{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `input` | Array.<string> | Array<InputDescription> | Description of the input data.
  `output` | OutputDescription | Array<OutputDescription> | Description of the output data.
  `mosaicking` | 'SIMPLE' | 'ORBIT' | 'TILE' (defaults to 'SIMPLE') | Control how samples from input scenes are composed.

#### Tile{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `date` | string | The date of scene used in the tile.
  `cloudCoverage` | number | The estimated percentage of pixels obscured by clouds in the scene.
  `dataPath` | string | The path to the data in storage.
  `shId` | number | The internal identifier for the scene.

#### TimeRange{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `from` | string | undefined | The start time (inclusive).
  `to` | string | undefined | The end time (inclusive).

#### UpdateOutput()

source/SentinelHub.js, line 56

#### UpdateOutputMetadata()

source/SentinelHub.js, line 60

#### UpdatedOutputDescription{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `bands` | number | Number of output bands.