File: gdalalg_vector_grid_linear.cpp

package info (click to toggle)
gdal 3.12.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 92,292 kB
  • sloc: cpp: 1,223,498; ansic: 206,434; python: 26,278; java: 6,001; xml: 4,769; sh: 3,855; cs: 2,513; yacc: 1,306; makefile: 214
file content (45 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download
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 grid linear" subcommand
 * Author:   Even Rouault <even dot rouault at spatialys.com>
 *
 ******************************************************************************
 * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
 *
 * SPDX-License-Identifier: MIT
 ****************************************************************************/

#include "gdalalg_vector_grid_linear.h"

#include <limits>

//! @cond Doxygen_Suppress

/************************************************************************/
/*    GDALVectorGridLinearAlgorithm::GDALVectorGridLinearAlgorithm()    */
/************************************************************************/

GDALVectorGridLinearAlgorithm::GDALVectorGridLinearAlgorithm(
    bool standaloneStep)
    : GDALVectorGridAbstractAlgorithm(NAME, DESCRIPTION, HELP_URL,
                                      standaloneStep)
{
    m_radius = std::numeric_limits<double>::infinity();
    AddRadiusArg().SetDefault(m_radius);
    AddNodataArg();
}

/************************************************************************/
/*               GDALVectorGridLinearAlgorithm::RunImpl()              */
/************************************************************************/

std::string GDALVectorGridLinearAlgorithm::GetGridAlgorithm() const
{
    return CPLSPrintf("linear:radius=%.17g:nodata=%.17g", m_radius, m_nodata);
}

GDALVectorGridLinearAlgorithmStandalone::
    ~GDALVectorGridLinearAlgorithmStandalone() = default;

//! @endcond