| 2245 | /************************************************************************/ |
| 2246 | |
| 2247 | static std::unique_ptr<GDALArgumentParser> |
| 2248 | GDALBuildVRTOptionsGetParser(GDALBuildVRTOptions *psOptions, |
| 2249 | GDALBuildVRTOptionsForBinary *psOptionsForBinary) |
| 2250 | { |
| 2251 | auto argParser = std::make_unique<GDALArgumentParser>( |
| 2252 | "gdalbuildvrt", /* bForBinary=*/psOptionsForBinary != nullptr); |
| 2253 | |
| 2254 | argParser->add_description(_("Builds a VRT from a list of datasets.")); |
| 2255 | |
| 2256 | argParser->add_epilog(_( |
| 2257 | "\n" |
| 2258 | "e.g.\n" |
| 2259 | " % gdalbuildvrt doq_index.vrt doq/*.tif\n" |
| 2260 | " % gdalbuildvrt -input_file_list my_list.txt doq_index.vrt\n" |
| 2261 | "\n" |
| 2262 | "NOTES:\n" |
| 2263 | " o With -separate, each files goes into a separate band in the VRT " |
| 2264 | "band.\n" |
| 2265 | " Otherwise, the files are considered as tiles of a larger mosaic.\n" |
| 2266 | " o -b option selects a band to add into vrt. Multiple bands can be " |
| 2267 | "listed.\n" |
| 2268 | " By default all bands are queried.\n" |
| 2269 | " o The default tile index field is 'location' unless otherwise " |
| 2270 | "specified by\n" |
| 2271 | " -tileindex.\n" |
| 2272 | " o In case the resolution of all input files is not the same, the " |
| 2273 | "-resolution\n" |
| 2274 | " flag enable the user to control the way the output resolution is " |
| 2275 | "computed.\n" |
| 2276 | " Average is the default.\n" |
| 2277 | " o Input files may be any valid GDAL dataset or a GDAL raster tile " |
| 2278 | "index.\n" |
| 2279 | " o For a GDAL raster tile index, all entries will be added to the " |
| 2280 | "VRT.\n" |
| 2281 | " o If one GDAL dataset is made of several subdatasets and has 0 " |
| 2282 | "raster bands,\n" |
| 2283 | " its datasets will be added to the VRT rather than the dataset " |
| 2284 | "itself.\n" |
| 2285 | " Single subdataset could be selected by its number using the -sd " |
| 2286 | "option.\n" |
| 2287 | " o By default, only datasets of same projection and band " |
| 2288 | "characteristics\n" |
| 2289 | " may be added to the VRT.\n" |
| 2290 | "\n" |
| 2291 | "For more details, consult " |
| 2292 | "https://gdal.org/programs/gdalbuildvrt.html")); |
| 2293 | |
| 2294 | argParser->add_quiet_argument( |
| 2295 | psOptionsForBinary ? &psOptionsForBinary->bQuiet : nullptr); |
| 2296 | |
| 2297 | { |
| 2298 | auto &group = argParser->add_mutually_exclusive_group(); |
| 2299 | |
| 2300 | group.add_argument("-strict") |
| 2301 | .flag() |
| 2302 | .store_into(psOptions->bStrict) |
| 2303 | .help(_("Turn warnings as failures.")); |
| 2304 |
no test coverage detected