Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: gdal "vector convert" 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 : #include "gdalalg_vector_convert.h" 14 : 15 : //! @cond Doxygen_Suppress 16 : 17 : /************************************************************************/ 18 : /* GDALVectorConvertAlgorithm::GDALVectorConvertAlgorithm() */ 19 : /************************************************************************/ 20 : 21 61 : GDALVectorConvertAlgorithm::GDALVectorConvertAlgorithm( 22 61 : bool /* standaloneStep */) 23 : : GDALVectorPipelineStepAlgorithm(NAME, DESCRIPTION, HELP_URL, 24 0 : ConstructorOptions() 25 61 : .SetStandaloneStep(true) 26 122 : .SetNoCreateEmptyLayersArgument(true)) 27 : { 28 61 : } 29 : 30 : /************************************************************************/ 31 : /* GDALVectorConvertAlgorithm::RunImpl() */ 32 : /************************************************************************/ 33 : 34 33 : bool GDALVectorConvertAlgorithm::RunStep(GDALPipelineStepRunContext &) 35 : { 36 : // Do nothing but forwarding the input dataset to the output. Real job 37 : // is done by GDALVectorWrite. 38 33 : CPLAssert(m_inputDataset.size() == 1); 39 33 : auto poSrcDS = m_inputDataset[0].GetDatasetRef(); 40 33 : CPLAssert(poSrcDS); 41 : 42 33 : m_outputDataset.Set(poSrcDS); 43 : 44 33 : return true; 45 : } 46 : 47 : //! @endcond