| ||||||||||||||
Advanced grid operationsThe advanced grid operations include such operation like scale operations (up-scale, down-scale, Shepard, Zoom2), focal operations and the calculation of distance. The scale operation is simple and works like in the picture
The Shepard interpolation is a widely used spatial interpolation method. It is suitable to up-scale a grid using interpolation between grid cells. The interpolation radius is used as a parameter3. A detailed description can be red in "Englen-Muellges, Uhlig: Numerical Algorithms with C" (Springer,1996). The Zoom2 algorithm can be used to zoom a grid about 2 times. This algorithm is based on a cellular automata and produces quite good results. A good idea is the use of this algorithm for presentations. The focal operations are also called moving window operations.
They calculate a density over a region of grid cells. That means a cell x[i][j] will be set to a value calculated from a values of its environment. The result has the unit .../m^2 or .../km^2 etc. This is a powerful method to evaluate a region. For example for a habitat of a bird it may be important that a lot of hedges are in the region but the location of it is not important. In this case a focal function calculates a density of hedges and solve the problem.
A bit different works the Or_Combine function. It fills nodata values of the original grid with data cells of an alternative grid. This can be used to overlay two maps. The first may contain all agricultural used grid cells the second my contain all grid cells with forest for example. As the result the first map will contain all grid cells with agricultural used cells and all grid cells with forest. The delta_diff calculates fabs(P1-P2)/P1. With P1,P2 as names of grids in P1 and P2. If a grid cell has nodata value or if a cell of (P1) is zero so the resulting grid cell will get the nodata value The last (but not the least) advanced function is the calculation of the distance. It calculates the distance to a selected value. This value can be a single point (for example a nesting place of a bird) or a selected value from a grid. (Use the cut function to select a value). This function needs a value as parameter1 to calculate the distance. To use this function a point theme can be used to describe the nesting places for example. Using the action "Point_2Grid" from the special pop-up window a point theme can be transfered into a grid. All the grid points have a value, maybe 1, that can be used as parameter for distance calculation. In addition to this functions is a set of functions to combine different grids. These functions can blend two grids to a new one (that is destructive function!). For example the "MUL_COMBINE" multiplies the selected grid with the grid cells from a grid in parameter1. If the grid in parameter1 contains only 0 or 1, so a traditional "and" combination will be performed. This kind of functions can be widely used in SAMT. Convolution with a Gaussian bell shape kernel
The moving window technology is mathematically nothing else than a convolution
in two dimensional space: To realize a convolution of a grid with an Gaussian bell shape function (Gaussian kernel) can be very time consuming due to the size of the Gaussian kernel. to cope with this a Fourier transformation was used. In the Fourier transformation maps the two dimensional grid in a complex space. In this space the convolution is simply a multiplication of the transformed original grid and the Gaussian kernel. Using an inverse Fourier transformation creates the result convolution grid in the space domain. Using the fast Fourier transformation allows a fast transformation. The complexity of the FFT is O(N*M*log(N*M)) and the multiplication is of the complexity O(N*M) which N and M are the number of rows and columns of the grid. Compared to the complexity O(N*M*N1*M1) of the ordinary moving window technology the FFT method can be much faster. DistanceThe distance function calculates the distances from one selected point in P1 to all other points and store it in a new map called distance. This points could be breeding points for example, so the distance function calculates all distances from any point to the nearest breeding place. Delta fabsCalculates fabs(map1-map2)/map1, given in P1=map1 P2=map2. This procedure is sometimes useful to compare different simulation results.
| ||||||||||||||