#include "gdal_alg.h"
Go to the source code of this file.
Typedefs | |
typedef CPLErr(* | GDALGridFunction )(const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
Functions | |
CPLErr | GDALGridInverseDistanceToAPower (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
CPLErr | GDALGridInverseDistanceToAPowerNoSearch (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
CPLErr | GDALGridMovingAverage (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
CPLErr | GDALGridNearestNeighbor (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
CPLErr | GDALGridDataMetricMinimum (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
CPLErr | GDALGridDataMetricMaximum (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
CPLErr | GDALGridDataMetricRange (const void *, GUInt32, const double *, const double *, const double *, double, double, double *) |
GDAL gridder related entry points and definitions.
CPLErr GDALGridDataMetricMaximum | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Maximum data value (data metric).
Maximum value found in grid node search ellipse. If there are no points found, the specified NODATA value will be returned.
where
poOptions | Algorithm parameters. This should point to GDALGridDataMetricsOptions object. | |
nPoints | Number of elements in input arrays. | |
padfX | Input array of X coordinates. | |
padfY | Input array of Y coordinates. | |
padfZ | Input array of Z values. | |
dfXPoint | X coordinate of the point to compute. | |
dfYPoint | Y coordinate of the point to compute. | |
pdfValue | Pointer to variable where the computed grid node value will be returned. |
CPLErr GDALGridDataMetricMinimum | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Minimum data value (data metric).
Minimum value found in grid node search ellipse. If there are no points found, the specified NODATA value will be returned.
where
poOptions | Algorithm parameters. This should point to GDALGridDataMetricsOptions object. | |
nPoints | Number of elements in input arrays. | |
padfX | Input array of X coordinates. | |
padfY | Input array of Y coordinates. | |
padfZ | Input array of Z values. | |
dfXPoint | X coordinate of the point to compute. | |
dfYPoint | Y coordinate of the point to compute. | |
pdfValue | Pointer to variable where the computed grid node value will be returned. |
CPLErr GDALGridDataMetricRange | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Data range (data metric).
A difference between the minimum and maximum values found in grid node search ellipse. If there are no points found, the specified NODATA value will be returned.
where
poOptions | Algorithm parameters. This should point to GDALGridDataMetricsOptions object. | |
nPoints | Number of elements in input arrays. | |
padfX | Input array of X coordinates. | |
padfY | Input array of Y coordinates. | |
padfZ | Input array of Z values. | |
dfXPoint | X coordinate of the point to compute. | |
dfYPoint | Y coordinate of the point to compute. | |
pdfValue | Pointer to variable where the computed grid node value will be returned. |
CPLErr GDALGridInverseDistanceToAPower | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Inverse distance to a power.
The Inverse Distance to a Power gridding method is a weighted average interpolator. You should supply the input arrays with the scattered data values including coordinates of every data point and output grid geometry. The function will compute interpolated value for the given position in output grid.
For every grid node the resulting value will be calculated using formula:
where
In this method the weighting factor is
poOptions | Algorithm parameters. This should point to GDALGridInverseDistanceToAPowerOptions object. | |
nPoints | Number of elements in input arrays. | |
padfX | Input array of X coordinates. | |
padfY | Input array of Y coordinates. | |
padfZ | Input array of Z values. | |
dfXPoint | X coordinate of the point to compute. | |
dfYPoint | Y coordinate of the point to compute. | |
nXPoint | X position of the point to compute. | |
nYPoint | Y position of the point to compute. | |
pdfValue | Pointer to variable where the computed grid node value will be returned. |
CPLErr GDALGridInverseDistanceToAPowerNoSearch | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Inverse distance to a power for whole data set.
This is somewhat optimized version of the Inverse Distance to a Power method. It is used when the search ellips is not set. The algorithm and parameters are the same as in GDALGridInverseDistanceToAPower(), but this implementation works faster, because of no search.
CPLErr GDALGridMovingAverage | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Moving average.
The Moving Average is a simple data averaging algorithm. It uses a moving window of elliptic form to search values and averages all data points within the window. Search ellipse can be rotated by specified angle, the center of ellipse located at the grid node. Also the minimum number of data points to average can be set, if there are not enough points in window, the grid node considered empty and will be filled with specified NODATA value.
Mathematically it can be expressed with the formula:
where
poOptions | Algorithm parameters. This should point to GDALGridMovingAverageOptions object. | |
nPoints | Number of elements in input arrays. | |
padfX | Input array of X coordinates. | |
padfY | Input array of Y coordinates. | |
padfZ | Input array of Z values. | |
dfXPoint | X coordinate of the point to compute. | |
dfYPoint | Y coordinate of the point to compute. | |
pdfValue | Pointer to variable where the computed grid node value will be returned. |
CPLErr GDALGridNearestNeighbor | ( | const void * | poOptions, | |
GUInt32 | nPoints, | |||
const double * | padfX, | |||
const double * | padfY, | |||
const double * | padfZ, | |||
double | dfXPoint, | |||
double | dfYPoint, | |||
double * | pdfValue | |||
) |
Nearest neighbor.
The Nearest Neighbor method doesn't perform any interpolation or smoothing, it just takes the value of nearest point found in grid node search ellipse and returns it as a result. If there are no points found, the specified NODATA value will be returned.
poOptions | Algorithm parameters. This should point to GDALGridNearestNeighborOptions object. | |
nPoints | Number of elements in input arrays. | |
padfX | Input array of X coordinates. | |
padfY | Input array of Y coordinates. | |
padfZ | Input array of Z values. | |
dfXPoint | X coordinate of the point to compute. | |
dfYPoint | Y coordinate of the point to compute. | |
pdfValue | Pointer to variable where the computed grid node value will be returned. |