From 916a92062ffa2f2b59007047fae2176bbb463ca3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 6 Dec 2019 14:07:27 +0100 Subject: Remove hgrids and vgrids member from PJ structure, and store them in hgridshift/vgridshift/deformation structures --- src/grids.hpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/grids.hpp') diff --git a/src/grids.hpp b/src/grids.hpp index 0c4af09f..975f7716 100644 --- a/src/grids.hpp +++ b/src/grids.hpp @@ -31,10 +31,9 @@ #include #include +#include "proj.h" #include "proj/util.hpp" -typedef struct projCtx_t PJ_CONTEXT; - NS_PROJ_START struct ExtentAndRes { @@ -149,6 +148,19 @@ class HorizontalShiftGridSet { const HorizontalShiftGrid *gridAt(double lon, double lat) const; }; +// --------------------------------------------------------------------------- + +typedef std::vector> ListOfHGrids; +typedef std::vector> ListOfVGrids; + +ListOfVGrids proj_vgrid_init(PJ *P, const char *grids); +ListOfHGrids proj_hgrid_init(PJ *P, const char *grids); +double proj_vgrid_value(PJ *P, const ListOfVGrids &, PJ_LP lp, + double vmultiplier); +PJ_LP proj_hgrid_value(PJ *P, const ListOfHGrids &, PJ_LP lp); +PJ_LP proj_hgrid_apply(PJ *P, const ListOfHGrids &, PJ_LP lp, + PJ_DIRECTION direction); + NS_PROJ_END #endif // GRIDS_HPP_INCLUDED -- cgit v1.2.3