##### Page tree
Go to start of banner

# InterpolationSpatialInverseDistance

## Transformation - InterpolationSpatial Inverse distance

 schema: transformationModule.xsd keywords: transformation, spatial interpolation, inverse distance
##### Description and usage

This transformation function calculates the output based on the weighted average of the closest input locations/grid cells. The weight of each input location/grid cell will be calculated by the inverse distance of each location.

This transformation can handle four types of input:

• scalar time series
• regular grid
• irregular grid
• longitudinal profile

The output can be a:

• scalar time series
• regular grid
• irregular grid
• longitudinal profile

If the time series is not a scalar time series the centre of the grid cell will be used when trying to find the closest input location/grid cell.

When a longitudinal profile is used the profile is considered to be a scattered grid.

The configurator has the possibility to configure a minimum and maximum value for the output. If the output exceeds the minimum or maximum value the output is truncated to that value.

It is also possible to maximize the search radius in which the transformation searches for the closest input location/grid cell. This can be done by setting the searchRadius in the configuration.

The weight of each input value in the output is computed by the inverse distance from the input location/grid cell to the output location/grid cell, using the formula:

where D is the distance between the input location/grid cell and the output location/grid cell, P is the configured inverseDistancePower and w is the weight.

The power to which the inverse distance is raised in this calculation can be configured. It is also possible to configure the maximum total number of input values which are used to calculate the output. First the transformation will try to find the closest input locations/grid cells which should be used in the calculation. If one or more values in the input values of these time series are missing values, the transformation will not search for the next closest locations/grid cells but will ignore these values in the calculation.

##### Input/Output time series

In this function one input time series and one output time series must be identified.

• inputVariable: a time series with input values. This can be a scalar time series, longitudinal profile or a time series with a regular/irregular grid.
• outputVariable: a time series in which the output will be stored. This can be a scalar time series, longitudinal profile or a time series with a regular/irregular grid.
##### Configuration

A basic configuration of the function is described below. This describes the main elements and attributes required and provides an example configuration.

inputVariable
Required element defining the identifier of the input time series with input values. This Id must reference a valid input time series.

outputVariable
Required element defining the identifier of the output time series with output values. This Id must reference a valid output time series.

minimumValue

Optional element defining the minimum value of the output time series. If the output value is lower than the configured minimum value the output value will be equal to the configured minimum value.

maximumValue

Optional element defining the maximum value of the output time series. If the output value is higher than the configured maximum value the output value will be equal to the configured maximum value.

Required element defining the maximum radius in which the transformation searches the closest location/grid cell. The unit is meters. But please note, before 2012.02 it was by accident in kilometers for WGS84.

distanceGeoDatum

Geo datum used to calculate the distances in meters between the points. To calculate distances efficiently and to pre-sort the input points in a grid the earth's curved surface should be transformed to a flat two-dimensional surface. When the input geometry is not in meters calculation of distances will be very slow and a search all is required when there is no exact match. When there is no region/country specific coordinate system available choose a utm zone that best fits with your output region. http://en.wikipedia.org/wiki/File:Utm-zones.jpg. eg. UTM55S for Victoria state in Australia. Only use zone number and N for northern hemisphere and S for southern hemisphere.

InverseDistancePower

Required element to define the InverseDistanceOptionPower to which the inverse distance will be raised to calculate the weight factor of the input location/grid cell

numberOfpoints

Required elemet to defie the maximum number of points/grid cells which will be used to calculate the output.

excludePointOfOrigin

Optinal field, default value is false. If it is set to true, the point of origin in the inverse-distance spatial interpolation transformation will be excluded from the calculation.

Example

```<interpolationSpatial>
<inverseDistance>
<inputVariable>
<variableId>input</variableId>
</inputVariable>
<minimumValue>0</minimumValue>
<maximumValue>10000</maximumValue>
<inverseDistancePower>2</inverseDistancePower>
<numberOfPoints>3</numberOfPoints>
<outputVariable>
<variableId>output</variableId>
</outputVariable>
</inverseDistance>
</interpolationSpatial>
```

None reported.

##### Related items

transformationModule.xsd

• No labels