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 35 : GDALVectorConvertAlgorithm::GDALVectorConvertAlgorithm( 22 35 : bool /* standaloneStep */) 23 : : GDALVectorPipelineStepAlgorithm(NAME, DESCRIPTION, HELP_URL, 24 35 : /*standaloneStep = */ true) 25 : { 26 35 : } 27 : 28 : /************************************************************************/ 29 : /* GDALVectorConvertAlgorithm::RunImpl() */ 30 : /************************************************************************/ 31 : 32 19 : bool GDALVectorConvertAlgorithm::RunStep(GDALPipelineStepRunContext &) 33 : { 34 : // Do nothing but forwarding the input dataset to the output. Real job 35 : // is done by GDALVectorWrite. 36 19 : CPLAssert(m_inputDataset.size() == 1); 37 19 : auto poSrcDS = m_inputDataset[0].GetDatasetRef(); 38 19 : CPLAssert(poSrcDS); 39 : 40 19 : m_outputDataset.Set(poSrcDS); 41 : 42 19 : return true; 43 : } 44 : 45 : //! @endcond