GDAL
gdalgenericinverse.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: Generic method to compute inverse coordinate transformation from
5 * forward method
6 * Author: Even Rouault <even dot rouault at spatialys dot com>
7 *
8 ******************************************************************************
9 * Copyright (c) 2023, Even Rouault <even dot rouault at spatialys dot com>
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef GDALGENERICINVERSE_H
15#define GDALGENERICINVERSE_H
16#include <stdbool.h>
17
18typedef bool (*GDALForwardCoordTransformer)(double xIn, double yIn,
19 double &xOut, double &yOut,
20 void *pUserData);
21
22bool GDALGenericInverse2D(double xIn, double yIn, double guessedXOut,
23 double guessedYOut,
24 GDALForwardCoordTransformer pfnForwardTranformer,
25 void *pfnForwardTranformerUserData, double &xOut,
26 double &yOut,
27 bool computeJacobianMatrixOnlyAtFirstIter = false,
28 double toleranceOnInputCoordinates = 0,
29 double toleranceOnOutputCoordinates = 0);
30
31#endif // GDALGENERICINVERSE_H