Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: "reproject" step of "vector pipeline" 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_VECTOR_REPROJECT_INCLUDED 14 : #define GDALALG_VECTOR_REPROJECT_INCLUDED 15 : 16 : #include "gdalalg_vector_pipeline.h" 17 : 18 : //! @cond Doxygen_Suppress 19 : 20 : /************************************************************************/ 21 : /* GDALVectorReprojectAlgorithm */ 22 : /************************************************************************/ 23 : 24 : class GDALVectorReprojectAlgorithm /* non final */ 25 : : public GDALVectorPipelineStepAlgorithm 26 : { 27 : public: 28 : static constexpr const char *NAME = "reproject"; 29 : static constexpr const char *DESCRIPTION = "Reproject a vector dataset."; 30 : static constexpr const char *HELP_URL = 31 : "/programs/gdal_vector_pipeline.html"; 32 : 33 142 : static std::vector<std::string> GetAliases() 34 : { 35 142 : return {}; 36 : } 37 : 38 : explicit GDALVectorReprojectAlgorithm(bool standaloneStep = false); 39 : 40 : private: 41 : bool RunStep(GDALProgressFunc pfnProgress, void *pProgressData) override; 42 : 43 : std::string m_srsCrs{}; 44 : std::string m_dstCrs{}; 45 : }; 46 : 47 : /************************************************************************/ 48 : /* GDALVectorReprojectAlgorithmStandalone */ 49 : /************************************************************************/ 50 : 51 : class GDALVectorReprojectAlgorithmStandalone final 52 : : public GDALVectorReprojectAlgorithm 53 : { 54 : public: 55 1 : GDALVectorReprojectAlgorithmStandalone() 56 1 : : GDALVectorReprojectAlgorithm(/* standaloneStep = */ true) 57 : { 58 1 : } 59 : }; 60 : 61 : //! @endcond 62 : 63 : #endif /* GDALALG_VECTOR_REPROJECT_INCLUDED */