Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When the input is a scalar time series the average value for a certain polygon in the output will be calculated by finding the points in the input time series which are within the area of the polygon and calculate the average value of these points. When the input is a time series with a grid (regular or irregular) the transformation will determine which cells of the input time series have an overlap with the output polygon and the average value of these cells will be calculated. The average value will be a weighted average. The weight of each input cell wil be based on how much area of the input cell covers a certain part of the output polygon. This is done by the next algorithm, called "cookie cutter":

  1. find smallest sub grid that contains the whole polygon
  2. quadruple the number of grid cells until the sub grid contains at least 10000 (sub) cells, this it is to detect that a cell is partially inside the polygon
  3. create an image with the same number of pixels as the refined sub grid
  4. convert the polygon coordinates to grid coordinates, coordinates are floating points so not only at cell centers
  5. draw the polygon at the image in black using Java2D
  6. analyze the image pixels. The number of black pixels per grid cell determines the weight of the grid cell for calculating the polygon sum or average

...

Note: It should not be used to transform one regular grid into another regular grid. Use the bilinear interpolation then. A config warning is raised when you use the average method.

Input/Output time series

...