Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: "calc" step of "raster pipeline" 5 : * Author: Daniel Baston 6 : * 7 : ****************************************************************************** 8 : * Copyright (c) 2025, ISciences LLC 9 : * 10 : * SPDX-License-Identifier: MIT 11 : ****************************************************************************/ 12 : 13 : #ifndef GDALALG_RASTER_CALC_INCLUDED 14 : #define GDALALG_RASTER_CALC_INCLUDED 15 : 16 : #include "gdalalg_raster_pipeline.h" 17 : 18 : //! @cond Doxygen_Suppress 19 : 20 : /************************************************************************/ 21 : /* GDALRasterCalcAlgorithm */ 22 : /************************************************************************/ 23 : 24 : class GDALRasterCalcAlgorithm : public GDALAlgorithm 25 : { 26 : public: 27 : explicit GDALRasterCalcAlgorithm() noexcept; 28 : 29 : static constexpr const char *NAME = "calc"; 30 : static constexpr const char *DESCRIPTION = "Perform raster algebra"; 31 : static constexpr const char *HELP_URL = "/programs/gdal_raster_calc.html"; 32 : 33 203 : static std::vector<std::string> GetAliases() 34 : { 35 203 : return {}; 36 : } 37 : 38 : private: 39 : bool RunImpl(GDALProgressFunc pfnProgress, void *pProgressData) override; 40 : 41 : std::vector<std::string> m_inputs{}; 42 : GDALArgDatasetValue m_dataset{}; 43 : std::vector<std::string> m_expr{}; 44 : GDALArgDatasetValue m_outputDataset{}; 45 : std::string m_format{}; 46 : std::vector<std::string> m_creationOptions{}; 47 : bool m_overwrite{false}; 48 : bool m_NoCheckSRS{false}; 49 : bool m_NoCheckExtent{false}; 50 : }; 51 : 52 : //! @endcond 53 : 54 : #endif /* GDALALG_RASTER_CALC_INCLUDED */