GDAL
gdalalg_raster_pixel_info.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: gdal "raster pixelinfo" 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_RASTER_PIXEL_INFO_INCLUDED
14#define GDALALG_RASTER_PIXEL_INFO_INCLUDED
15
16#include "gdalalgorithm.h"
17
19
20/************************************************************************/
21/* GDALRasterPixelInfoAlgorithm */
22/************************************************************************/
23
24class GDALRasterPixelInfoAlgorithm final : public GDALAlgorithm
25{
26 public:
27 static constexpr const char *NAME = "pixel-info";
28 static constexpr const char *DESCRIPTION =
29 "Return information on a pixel of a raster dataset.";
30 static constexpr const char *HELP_URL =
31 "/programs/gdal_raster_pixel_info.html";
32
33 GDALRasterPixelInfoAlgorithm();
34
35 private:
36 bool RunImpl(GDALProgressFunc pfnProgress, void *pProgressData) override;
37
38 std::string m_format = "json";
39 GDALArgDatasetValue m_dataset{};
40 std::vector<std::string> m_openOptions{};
41 std::vector<std::string> m_inputFormats{};
42 std::string m_output{};
43 std::vector<int> m_band{};
44 int m_overview = -1;
45 std::vector<double> m_pos{};
46 std::string m_posCrs{};
47 std::string m_resampling = "nearest";
48
49 void PrintLine(const std::string &str);
50};
51
53
54#endif
GDAL algorithm.
Definition gdalalgorithm_cpp.h:2261