| 43 | /************************************************************************/ |
| 44 | |
| 45 | MAIN_START(argc, argv) |
| 46 | |
| 47 | { |
| 48 | double dfGeoX = std::numeric_limits<double>::quiet_NaN(); |
| 49 | double dfGeoY = std::numeric_limits<double>::quiet_NaN(); |
| 50 | std::string osSrcFilename; |
| 51 | std::string osSourceSRS; |
| 52 | std::vector<int> anBandList; |
| 53 | bool bAsXML = false, bLIFOnly = false; |
| 54 | bool bQuiet = false, bValOnly = false; |
| 55 | int nOverview = 0; |
| 56 | CPLStringList aosOpenOptions; |
| 57 | std::string osFieldSep; |
| 58 | bool bIgnoreExtraInput = false; |
| 59 | bool bEcho = false; |
| 60 | |
| 61 | GDALAllRegister(); |
| 62 | argc = GDALGeneralCmdLineProcessor(argc, &argv, 0); |
| 63 | if (argc < 1) |
| 64 | exit(-argc); |
| 65 | CPLStringList aosArgv; |
| 66 | aosArgv.Assign(argv, /* bAssign = */ true); |
| 67 | |
| 68 | GDALArgumentParser argParser(aosArgv[0], /* bForBinary=*/true); |
| 69 | |
| 70 | argParser.add_description(_("Raster query tool.")); |
| 71 | |
| 72 | const char *pszEpilog = |
| 73 | _("For more details, consult " |
| 74 | "https://gdal.org/programs/gdallocationinfo.html"); |
| 75 | argParser.add_epilog(pszEpilog); |
| 76 | |
| 77 | argParser.add_argument("-xml").flag().store_into(bAsXML).help( |
| 78 | _("Format the output report as XML.")); |
| 79 | |
| 80 | argParser.add_argument("-lifonly") |
| 81 | .flag() |
| 82 | .store_into(bLIFOnly) |
| 83 | .help(_("Only outputs filenames from the LocationInfo request against " |
| 84 | "the database.")); |
| 85 | |
| 86 | argParser.add_argument("-valonly") |
| 87 | .flag() |
| 88 | .store_into(bValOnly) |
| 89 | .help(_("Only outputs pixel values of the selected pixel on each of " |
| 90 | "the selected bands.")); |
| 91 | |
| 92 | argParser.add_argument("-E").flag().store_into(bEcho).help( |
| 93 | _("Enable Echo mode, where input coordinates are prepended to the " |
| 94 | "output lines in -valonly mode.")); |
| 95 | |
| 96 | argParser.add_argument("-field_sep") |
| 97 | .metavar("<sep>") |
| 98 | .store_into(osFieldSep) |
| 99 | .help(_("Defines the field separator, used in -valonly mode, to " |
| 100 | "separate different values.")); |
| 101 | |
| 102 | argParser.add_argument("-ignore_extra_input") |
nothing calls this directly
no test coverage detected