18int main(
int argc,
char* argv[])
21 "Create a raster of specified size at specified origin where every "
22 "pixel has the value zero.\n\n"
23 "OpenGeoSys-6 software, version " +
26 "Copyright (c) 2012-2026, OpenGeoSys Community "
27 "(http://www.opengeosys.org)",
30 cmd.setOutput(&tclapOutput);
32 TCLAP::ValueArg<std::string> output_arg(
"o",
"output",
33 "Output (.asc). Name of the output"
35 true,
"",
"OUTPUT_FILE");
37 TCLAP::ValueArg<std::size_t> n_rows(
"r",
"n_rows",
"number of rows",
false,
40 TCLAP::ValueArg<std::size_t> n_cols(
"c",
"n_cols",
"number of columns",
41 false, 1000,
"NUM_COLS");
43 TCLAP::ValueArg<double> cell_size(
"s",
"cell_size",
46 false, 10.0,
"CELL_SIZE");
48 TCLAP::ValueArg<double> ll_y_arg(
51 "y coordinate of lower left point of axis aligned rectangular region",
56 TCLAP::ValueArg<double> ll_x_arg(
59 "x coordinate of lower left point of axis aligned rectangular region",
66 cmd.add(log_level_arg);
67 cmd.parse(argc, argv);
79 std::vector<double> raster_data(header.
n_cols * header.
n_rows, 0.0);
80 GeoLib::Raster const raster{header, raster_data.begin(), raster_data.end()};
83 output_arg.getValue());