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
46static const char szAlgNameInvDist[] = "invdist";
47static const char szAlgNameInvDistNearestNeighbor[] = "invdistnn";
48static const char szAlgNameAverage[] = "average";
49static const char szAlgNameNearest[] = "nearest";
50static const char szAlgNameMinimum[] = "minimum";
51static const char szAlgNameMaximum[] = "maximum";
52static const char szAlgNameRange[] = "range";
53static const char szAlgNameCount[] = "count";
54static const char szAlgNameAverageDistance[] = "average_distance";
55static const char szAlgNameAverageDistancePts[] = "average_distance_pts";
56static const char szAlgNameLinear[] = "linear";
57
59
61typedef CPLErr (*GDALGridFunction)(const void *, GUInt32, const double *,
62 const double *, const double *, double,
63 double, double *, void *);
66CPLErr GDALGridInverseDistanceToAPower(const void *, GUInt32, const double *,
67 const double *, const double *, double,
68 double, double *, void *);
70 const double *,
71 const double *,
72 const double *, double,
73 double, double *, void *);
75 const double *, const double *,
76 const double *, double, double,
77 double *, void *);
78CPLErr GDALGridMovingAverage(const void *, GUInt32, const double *,
79 const double *, const double *, double, double,
80 double *, void *);
81CPLErr GDALGridNearestNeighbor(const void *, GUInt32, const double *,
82 const double *, const double *, double, double,
83 double *, void *);
84CPLErr GDALGridDataMetricMinimum(const void *, GUInt32, const double *,
85 const double *, const double *, double, double,
86 double *, void *);
87CPLErr GDALGridDataMetricMaximum(const void *, GUInt32, const double *,
88 const double *, const double *, double, double,
89 double *, void *);
90CPLErr GDALGridDataMetricRange(const void *, GUInt32, const double *,
91 const double *, const double *, double, double,
92 double *, void *);
93CPLErr GDALGridDataMetricCount(const void *, GUInt32, const double *,
94 const double *, const double *, double, double,
95 double *, void *);
96CPLErr GDALGridDataMetricAverageDistance(const void *, GUInt32, const double *,
97 const double *, const double *, double,
98 double, double *, void *);
100 const double *, const double *,
101 const double *, double, double,
102 double *, void *);
103CPLErr 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
113CPLErr CPL_DLL GDALGridParseAlgorithmAndOptions(const char *,
114 GDALGridAlgorithm *, void **);
115
117
118#endif /* GDALGRID_H_INCLUDED */
CPLErr
Error category.
Definition cpl_error.h:53
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:299
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:295
unsigned int GUInt32
Unsigned int32 type.
Definition cpl_port.h:177
Public (C callable) GDAL algorithm entry points, and definitions.
GDALGridAlgorithm
Gridding Algorithms.
Definition gdal_alg.h:402
CPLErr GDALGridDataMetricMaximum(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Maximum data value (data metric).
Definition gdalgrid.cpp:1343
CPLErr GDALGridDataMetricMinimum(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Minimum data value (data metric).
Definition gdalgrid.cpp:1049
CPLErr GDALGridMovingAverage(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Moving average.
Definition gdalgrid.cpp:645
CPLErr GDALGridLinear(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Linear interpolation.
Definition gdalgrid.cpp:2475
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
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
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
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
CPLErr GDALGridParseAlgorithmAndOptions(const char *, GDALGridAlgorithm *, void **)
Translates mnemonic gridding algorithm names into GDALGridAlgorithm code, parse control parameters an...
Definition gdalgrid.cpp:3684
CPLErr GDALGridNearestNeighbor(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Nearest neighbor.
Definition gdalgrid.cpp:895
CPLErr GDALGridInverseDistanceToAPower(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Inverse distance to a power.
Definition gdalgrid.cpp:125
CPLErr GDALGridDataMetricAverageDistance(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Average distance (data metric).
Definition gdalgrid.cpp:2030
CPLErr GDALGridDataMetricRange(const void *, GUInt32, const double *, const double *, const double *, double, double, double *, void *)
Data range (data metric).
Definition gdalgrid.cpp:1500