| 27 | /************************************************************************/ |
| 28 | |
| 29 | GDALRasterInfoAlgorithm::GDALRasterInfoAlgorithm(bool standaloneStep, |
| 30 | bool openForMixedRasterVector) |
| 31 | : GDALRasterPipelineStepAlgorithm( |
| 32 | NAME, DESCRIPTION, HELP_URL, |
| 33 | ConstructorOptions() |
| 34 | .SetStandaloneStep(standaloneStep) |
| 35 | .SetInputDatasetMaxCount(1) |
| 36 | .SetAddDefaultArguments(false) |
| 37 | .SetInputDatasetHelpMsg(_("Input raster dataset")) |
| 38 | .SetInputDatasetAlias("dataset")) |
| 39 | { |
| 40 | if (standaloneStep) |
| 41 | { |
| 42 | AddRasterInputArgs(openForMixedRasterVector, |
| 43 | /* hiddenForCLI = */ false); |
| 44 | } |
| 45 | else |
| 46 | { |
| 47 | AddRasterHiddenInputDatasetArg(); |
| 48 | } |
| 49 | |
| 50 | AddOutputFormatArg(&m_format).SetChoices("json", "text"); |
| 51 | AddArg("min-max", 0, _("Compute minimum and maximum value"), &m_minMax) |
| 52 | .AddAlias("mm"); |
| 53 | AddArg("stats", 0, _("Retrieve or compute statistics, using all pixels"), |
| 54 | &m_stats) |
| 55 | .SetMutualExclusionGroup("stats"); |
| 56 | AddArg("approx-stats", 0, |
| 57 | _("Retrieve or compute statistics, using a subset of pixels"), |
| 58 | &m_approxStats) |
| 59 | .SetMutualExclusionGroup("stats"); |
| 60 | AddArg("hist", 0, _("Retrieve or compute histogram"), &m_hist); |
| 61 | |
| 62 | AddArg("no-gcp", 0, _("Suppress ground control points list printing"), |
| 63 | &m_noGCP) |
| 64 | .SetCategory(GAAC_ADVANCED); |
| 65 | AddArg("no-md", 0, _("Suppress metadata printing"), &m_noMD) |
| 66 | .SetCategory(GAAC_ADVANCED); |
| 67 | AddArg("no-ct", 0, _("Suppress color table printing"), &m_noCT) |
| 68 | .SetCategory(GAAC_ADVANCED); |
| 69 | AddArg("no-fl", 0, _("Suppress file list printing"), &m_noFL) |
| 70 | .SetCategory(GAAC_ADVANCED); |
| 71 | AddArg("checksum", 0, _("Compute pixel checksum"), &m_checksum) |
| 72 | .SetCategory(GAAC_ADVANCED); |
| 73 | AddArg("list-mdd", 0, |
| 74 | _("List all metadata domains available for the dataset"), &m_listMDD) |
| 75 | .AddAlias("list-metadata-domains") |
| 76 | .SetCategory(GAAC_ADVANCED); |
| 77 | AddArg("metadata-domain", 0, |
| 78 | _("Report metadata for the specified domain. 'all' can be used to " |
| 79 | "report metadata in all domains"), |
| 80 | &m_mdd) |
| 81 | .AddAlias("mdd") |
| 82 | .SetCategory(GAAC_ADVANCED); |
| 83 | |
| 84 | AddArg("no-nodata", 0, _("Suppress retrieving nodata value"), &m_noNodata) |
| 85 | .SetCategory(GAAC_ESOTERIC); |
| 86 | AddArg("no-mask", 0, _("Suppress mask band information"), &m_noMask) |
nothing calls this directly
no test coverage detected