Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: gdal "vector grid nearest" 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 : #ifndef GDALALG_VECTOR_GRID_NEAREST_INCLUDED 14 : #define GDALALG_VECTOR_GRID_NEAREST_INCLUDED 15 : 16 : #include "gdalalg_vector_grid.h" 17 : 18 : //! @cond Doxygen_Suppress 19 : 20 : /************************************************************************/ 21 : /* GDALVectorGridNearestAlgorithm */ 22 : /************************************************************************/ 23 : 24 : class GDALVectorGridNearestAlgorithm /* non final */ 25 : : public GDALVectorGridAbstractAlgorithm 26 : { 27 : public: 28 : static constexpr const char *NAME = "nearest"; 29 : static constexpr const char *DESCRIPTION = 30 : "Create a regular grid from scattered points using nearest neighbor " 31 : "interpolation."; 32 : static constexpr const char *HELP_URL = "/programs/gdal_vector_grid.html"; 33 : 34 : explicit GDALVectorGridNearestAlgorithm(bool standaloneStep = false); 35 : 36 : std::string GetGridAlgorithm() const override; 37 : }; 38 : 39 : /************************************************************************/ 40 : /* GDALVectorGridNearestAlgorithmStandalone */ 41 : /************************************************************************/ 42 : 43 14 : class GDALVectorGridNearestAlgorithmStandalone final 44 : : public GDALVectorGridNearestAlgorithm 45 : { 46 : public: 47 7 : GDALVectorGridNearestAlgorithmStandalone() 48 7 : : GDALVectorGridNearestAlgorithm(/* standaloneStep = */ true) 49 : { 50 7 : } 51 : 52 : ~GDALVectorGridNearestAlgorithmStandalone() override; 53 : }; 54 : 55 : //! @endcond 56 : 57 : #endif