Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: gdal "raster buildvrt" subcommand 5 : * Author: Even Rouault <even dot rouault at spatialys.com> 6 : * 7 : ****************************************************************************** 8 : * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com> 9 : * 10 : * SPDX-License-Identifier: MIT 11 : ****************************************************************************/ 12 : 13 : #ifndef GDALALG_RASTER_BUILDVRT_INCLUDED 14 : #define GDALALG_RASTER_BUILDVRT_INCLUDED 15 : 16 : #include "gdalalgorithm.h" 17 : 18 : //! @cond Doxygen_Suppress 19 : 20 : /************************************************************************/ 21 : /* GDALRasterBuildVRTAlgorithm */ 22 : /************************************************************************/ 23 : 24 : class GDALRasterBuildVRTAlgorithm final : public GDALAlgorithm 25 : { 26 : public: 27 : static constexpr const char *NAME = "buildvrt"; 28 : static constexpr const char *DESCRIPTION = "Build a virtual dataset (VRT)."; 29 : static constexpr const char *HELP_URL = 30 : "/programs/gdal_raster_buildvrt.html"; 31 : 32 168 : static std::vector<std::string> GetAliases() 33 : { 34 168 : return {}; 35 : } 36 : 37 : explicit GDALRasterBuildVRTAlgorithm(); 38 : 39 : private: 40 : bool RunImpl(GDALProgressFunc pfnProgress, void *pProgressData) override; 41 : 42 : std::vector<GDALArgDatasetValue> m_inputDatasets{}; 43 : GDALArgDatasetValue m_outputDataset{}; 44 : std::vector<std::string> m_creationOptions{}; 45 : bool m_overwrite = false; 46 : bool m_separate = false; 47 : std::string m_resolution{}; 48 : std::vector<double> m_bbox{}; 49 : bool m_targetAlignedPixels = false; 50 : std::vector<double> m_srcNoData{}; 51 : std::vector<double> m_vrtNoData{}; 52 : std::vector<int> m_bands{}; 53 : bool m_hideNoData = false; 54 : bool m_addAlpha = false; 55 : }; 56 : 57 : //! @endcond 58 : 59 : #endif