Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: gdal "vector grid linear" subcommand 5 : * Author: Even Rouault <even dot rouault at spatialys.com> 6 : * 7 : ****************************************************************************** 8 : * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com> 9 : * 10 : * SPDX-License-Identifier: MIT 11 : ****************************************************************************/ 12 : 13 : #include "gdalalg_vector_grid_linear.h" 14 : 15 : #include <limits> 16 : 17 : //! @cond Doxygen_Suppress 18 : 19 : /************************************************************************/ 20 : /* GDALVectorGridLinearAlgorithm::GDALVectorGridLinearAlgorithm() */ 21 : /************************************************************************/ 22 : 23 6 : GDALVectorGridLinearAlgorithm::GDALVectorGridLinearAlgorithm() 24 6 : : GDALVectorGridAbstractAlgorithm(NAME, DESCRIPTION, HELP_URL) 25 : { 26 6 : m_radius = std::numeric_limits<double>::infinity(); 27 6 : AddRadiusArg().SetDefault(m_radius); 28 6 : AddNodataArg(); 29 6 : } 30 : 31 : /************************************************************************/ 32 : /* GDALVectorGridLinearAlgorithm::RunImpl() */ 33 : /************************************************************************/ 34 : 35 5 : std::string GDALVectorGridLinearAlgorithm::GetGridAlgorithm() const 36 : { 37 5 : return CPLSPrintf("linear:radius=%.17g:nodata=%.17g", m_radius, m_nodata); 38 : } 39 : 40 : //! @endcond