Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: "reproject" step of "mdim pipeline" 5 : * Author: Even Rouault <even dot rouault at spatialys.com> 6 : * 7 : ****************************************************************************** 8 : * Copyright (c) 2026, Even Rouault <even dot rouault at spatialys.com> 9 : * 10 : * SPDX-License-Identifier: MIT 11 : ****************************************************************************/ 12 : 13 : #ifndef GDALALG_MDIM_REPROJECT_INCLUDED 14 : #define GDALALG_MDIM_REPROJECT_INCLUDED 15 : 16 : #include "gdalmdimpipelinestepalgorithm.h" 17 : 18 : #include <limits> 19 : 20 : //! @cond Doxygen_Suppress 21 : 22 : /************************************************************************/ 23 : /* GDALMdimReprojectAlgorithm */ 24 : /************************************************************************/ 25 : 26 : class GDALMdimReprojectAlgorithm /* non final */ 27 : : public GDALMdimPipelineStepAlgorithm 28 : { 29 : public: 30 : static constexpr const char *NAME = "reproject"; 31 : static constexpr const char *DESCRIPTION = 32 : "Reproject a multidimensional dataset."; 33 : static constexpr const char *HELP_URL = 34 : "/programs/gdal_mdim_reproject.html"; 35 : 36 194 : static std::vector<std::string> GetAliasesStatic() 37 : { 38 582 : return {GDALAlgorithmRegistry::HIDDEN_ALIAS_SEPARATOR, "warp"}; 39 : } 40 : 41 : explicit GDALMdimReprojectAlgorithm(bool standaloneStep = false); 42 : 43 : private: 44 : bool RunStep(GDALPipelineStepRunContext &ctxt) override; 45 : 46 : std::string m_dstCrs{}; 47 : std::string m_resampling{}; 48 : }; 49 : 50 : /************************************************************************/ 51 : /* GDALMdimReprojectAlgorithmStandalone */ 52 : /************************************************************************/ 53 : 54 88 : class GDALMdimReprojectAlgorithmStandalone final 55 : : public GDALMdimReprojectAlgorithm 56 : { 57 : public: 58 44 : GDALMdimReprojectAlgorithmStandalone() 59 44 : : GDALMdimReprojectAlgorithm(/* standaloneStep = */ true) 60 : { 61 44 : } 62 : 63 : ~GDALMdimReprojectAlgorithmStandalone() override; 64 : }; 65 : 66 : //! @endcond 67 : 68 : #endif /* GDALALG_RASTER_REPROJECT_INCLUDED */