MCPcopy Create free account
hub / github.com/OSGeo/gdal / GDALMainAlgorithm

Method GDALMainAlgorithm

apps/gdalalg_main.cpp:27–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25/************************************************************************/
26
27GDALMainAlgorithm::GDALMainAlgorithm()
28 : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
29{
30 for (const std::string &subAlgName :
31 GDALGlobalAlgorithmRegistry::GetSingleton().GetNames())
32 {
33 const auto pInfo =
34 GDALGlobalAlgorithmRegistry::GetSingleton().GetInfo(subAlgName);
35 if (pInfo)
36 RegisterSubAlgorithm(*pInfo);
37 }
38
39 SetCallPath({NAME});
40
41 AddArg("version", 0, _("Display GDAL version and exit"), &m_version)
42 .SetHiddenForAPI();
43 AddArg("drivers", 0, _("Display driver list as JSON document"), &m_drivers);
44
45 AddOutputStringArg(&m_output);
46
47 m_longDescription = "'gdal <FILENAME>' can also be used as a shortcut for "
48 "'gdal info <FILENAME>'.\n"
49 "And 'gdal read <FILENAME> ! ...' as a shortcut for "
50 "'gdal pipeline <FILENAME> ! ...'.";
51
52 SetDisplayInJSONUsage(false);
53}
54
55/************************************************************************/
56/* GDALMainAlgorithm::ParseCommandLineArguments() */

Callers

nothing calls this directly

Calls 5

RegisterSubAlgorithmFunction · 0.85
SetCallPathFunction · 0.85
SetDisplayInJSONUsageFunction · 0.85
GetNamesMethod · 0.80
GetInfoMethod · 0.45

Tested by

no test coverage detected