1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
/******************************************************************************
*
* Project: GDAL
* Purpose: gdal "vector convert" subcommand
* Author: Even Rouault <even dot rouault at spatialys.com>
*
******************************************************************************
* Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
*
* SPDX-License-Identifier: MIT
****************************************************************************/
#include "gdalalg_vector_convert.h"
//! @cond Doxygen_Suppress
/************************************************************************/
/* GDALVectorConvertAlgorithm::GDALVectorConvertAlgorithm() */
/************************************************************************/
GDALVectorConvertAlgorithm::GDALVectorConvertAlgorithm(
bool /* standaloneStep */)
: GDALVectorPipelineStepAlgorithm(NAME, DESCRIPTION, HELP_URL,
/*standaloneStep = */ true)
{
}
/************************************************************************/
/* GDALVectorConvertAlgorithm::RunImpl() */
/************************************************************************/
bool GDALVectorConvertAlgorithm::RunStep(GDALPipelineStepRunContext &)
{
// Do nothing but forwarding the input dataset to the output. Real job
// is done by GDALVectorWrite.
CPLAssert(m_inputDataset.size() == 1);
auto poSrcDS = m_inputDataset[0].GetDatasetRef();
CPLAssert(poSrcDS);
m_outputDataset.Set(poSrcDS);
return true;
}
//! @endcond
|