GDAL

gdalgrid.h
Go to the documentation of this file.
1/******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL Gridding API.
5 * Purpose: Prototypes, and definitions for of GDAL scattered data gridder.
6 * Author: Andrey Kiselev, dron@ak4719.spb.edu
7 *
8 ******************************************************************************
9 * Copyright (c) 2007, Andrey Kiselev <dron@ak4719.spb.edu>
10 * Copyright (c) 2012, Even Rouault <even dot rouault at spatialys.com>
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 ****************************************************************************/
30
31#ifndef GDALGRID_H_INCLUDED
32#define GDALGRID_H_INCLUDED
33
40#include "gdal_alg.h"
41
42/*
43 * GridCreate Algorithm names
44 */
45
46 static const char szAlgNameInvDist[] = "invdist";
47 static const char szAlgNameInvDistNearestNeighbor[] = "invdistnn";
48 static const char szAlgNameAverage[] = "average";
49 static const char szAlgNameNearest[] = "nearest";
50 static const char szAlgNameMinimum[] = "minimum";
51 static const char szAlgNameMaximum[] = "maximum";
52 static const char szAlgNameRange[] = "range";
53 static const char szAlgNameCount[] = "count";
54 static const char szAlgNameAverageDistance[] = "average_distance";
55 static const char szAlgNameAverageDistancePts[] = "average_distance_pts";
56 static const char szAlgNameLinear[] = "linear";
57
58 CPL_C_START
59
61 typedef CPLErr (*GDALGridFunction)(const void *, GUInt32, const double *,
62 const double *, const double *, double,
63 double, double *, void *);
66 CPLErr GDALGridInverseDistanceToAPower(const void *, GUInt32, const double *,
67 const double *, const double *, double,
68 double, double *, void *);
69 CPLErr GDALGridInverseDistanceToAPowerNearestNeighbor(const void *, GUInt32,
70 const double *,
71 const double *,
72 const double *, double,
73 double, double *, void *);
74 CPLErr GDALGridInverseDistanceToAPowerNoSearch(const void *, GUInt32,
75 const double *, const double *,
76 const double *, double, double,
77 double *, void *);
78 CPLErr GDALGridMovingAverage(const void *, GUInt32, const double *,
79 const double *, const double *, double, double,
80 double *, void *);
81 CPLErr GDALGridNearestNeighbor(const void *, GUInt32, const double *,
82 const double *, const double *, double, double,
83 double *, void *);
84 CPLErr GDALGridDataMetricMinimum(const void *, GUInt32, const double *,
85 const double *, const double *, double, double,
86 double *, void *);
87 CPLErr GDALGridDataMetricMaximum(const void *, GUInt32, const double *,
88 const double *, const double *, double, double,
89 double *, void *);
90 CPLErr GDALGridDataMetricRange(const void *, GUInt32, const double *,
91 const double *, const double *, double, double,
92 double *, void *);
93 CPLErr GDALGridDataMetricCount(const void *, GUInt32, const double *,
94 const double *, const double *, double, double,
95 double *, void *);
96 CPLErr GDALGridDataMetricAverageDistance(const void *, GUInt32, const double *,
97 const double *, const double *, double,
98 double, double *, void *);
99 CPLErr GDALGridDataMetricAverageDistancePts(const void *, GUInt32,
100 const double *, const double *,
101 const double *, double, double,
102 double *, void *);
103 CPLErr GDALGridLinear(const void *, GUInt32, const double *, const double *,
104 const double *, double, double, double *, void *);
105
106#ifndef GDAL_COMPILATION
107/* ParseAlgorithmAndOptions() is used by PostGIS Raster, hence this alias */
108
110#define ParseAlgorithmAndOptions GDALGridParseAlgorithmAndOptions
111#endif
112
113 CPLErr CPL_DLL GDALGridParseAlgorithmAndOptions(const char *,
114 GDALGridAlgorithm *, void **);
115
116 CPL_C_END
117
118#endif /* GDALGRID_H_INCLUDED */
CPLErr
CPLErr
Error category.
Definition cpl_error.h:53
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:299
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:295
GUInt32
unsigned int GUInt32
Unsigned int32 type.
Definition cpl_port.h:177
gdal_alg.h
Public (C callable) GDAL algorithm entry points, and definitions.
GDALGridAlgorithm
GDALGridAlgorithm
Gridding Algorithms.
Definition gdal_alg.h:402
GDALGridDataMetricMaximum
CPLErr GDALGridDataMetricMaximum(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Maximum data value (data metric).
Definition gdalgrid.cpp:1343
GDALGridDataMetricMinimum
CPLErr GDALGridDataMetricMinimum(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Minimum data value (data metric).
Definition gdalgrid.cpp:1049
GDALGridMovingAverage
CPLErr GDALGridMovingAverage(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Moving average.
Definition gdalgrid.cpp:645
GDALGridLinear
CPLErr GDALGridLinear(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Linear interpolation.
Definition gdalgrid.cpp:2475
GDALGridInverseDistanceToAPowerNearestNeighbor
CPLErr GDALGridInverseDistanceToAPowerNearestNeighbor(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Inverse distance to a power with nearest neighbor search, ideal when max_points used.
Definition gdalgrid.cpp:257
GDALGridInverseDistanceToAPowerNoSearch
CPLErr GDALGridInverseDistanceToAPowerNoSearch(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Inverse distance to a power for whole data set.
Definition gdalgrid.cpp:513
GDALGridDataMetricCount
CPLErr GDALGridDataMetricCount(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Number of data points (data metric).
Definition gdalgrid.cpp:1771
GDALGridDataMetricAverageDistancePts
CPLErr GDALGridDataMetricAverageDistancePts(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Average distance between points (data metric).
Definition gdalgrid.cpp:2299
GDALGridParseAlgorithmAndOptions
CPLErr GDALGridParseAlgorithmAndOptions(const char *, GDALGridAlgorithm *, void **)
Translates mnemonic gridding algorithm names into GDALGridAlgorithm code, parse control parameters an...
Definition gdalgrid.cpp:3683
GDALGridNearestNeighbor
CPLErr GDALGridNearestNeighbor(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Nearest neighbor.
Definition gdalgrid.cpp:895
GDALGridInverseDistanceToAPower
CPLErr GDALGridInverseDistanceToAPower(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Inverse distance to a power.
Definition gdalgrid.cpp:125
GDALGridDataMetricAverageDistance
CPLErr GDALGridDataMetricAverageDistance(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Average distance (data metric).
Definition gdalgrid.cpp:2030
GDALGridDataMetricRange
CPLErr GDALGridDataMetricRange(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Data range (data metric).
Definition gdalgrid.cpp:1500