13#ifndef GDALALG_MANAGE_IDENTIFY_INCLUDED
14#define GDALALG_MANAGE_IDENTIFY_INCLUDED
16#include "gdalalgorithm.h"
18#include "cpl_json_streaming_writer.h"
19#include "cpl_vsi_virtual.h"
29class GDALDatasetIdentifyAlgorithm final :
public GDALAlgorithm
32 static constexpr const char *NAME =
"identify";
33 static constexpr const char *DESCRIPTION =
34 "Identify driver opening dataset(s).";
35 static constexpr const char *HELP_URL =
36 "/programs/gdal_dataset_identify.html";
38 GDALDatasetIdentifyAlgorithm();
39 ~GDALDatasetIdentifyAlgorithm()
override;
42 std::vector<std::string> m_filename{};
43 std::string m_format{};
44 std::vector<std::string> m_creationOptions{};
45 std::vector<std::string> m_layerCreationOptions{};
47 std::string m_outputLayerName{};
48 bool m_overwrite =
false;
49 std::string m_output{};
50 bool m_recursive =
false;
51 bool m_forceRecursive =
false;
52 bool m_reportFailures =
false;
53 bool m_detailed =
false;
54 bool m_stdout =
false;
56 CPLJSonStreamingWriter m_oWriter;
57 VSIVirtualHandleUniquePtr m_fpOut{};
58 std::unique_ptr<GDALDataset> m_poOutDS{};
61 bool RunImpl(GDALProgressFunc,
void *)
override;
62 void Print(
const char *str);
63 bool Process(
const char *pszTarget,
CSLConstList papszSiblingList,
64 GDALProgressFunc pfnProgress,
void *pProgressData);
65 static void JSONPrint(
const char *pszTxt,
void *pUserData);
67 GDALDatasetIdentifyAlgorithm(
const GDALDatasetIdentifyAlgorithm &) =
delete;
68 GDALDatasetIdentifyAlgorithm &
69 operator=(
const GDALDatasetIdentifyAlgorithm &) =
delete;
GDAL algorithm.
Definition gdalalgorithm_cpp.h:2445
Value for an argument that points to a GDALDataset.
Definition gdalalgorithm_cpp.h:163
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1252