23int main(
int argc,
char* argv[])
26 "Create a raster of specified size at specified origin where every "
27 "pixel has the value zero.\n\n"
28 "OpenGeoSys-6 software, version " +
31 "Copyright (c) 2012-2024, OpenGeoSys Community "
32 "(http://www.opengeosys.org)",
35 TCLAP::ValueArg<std::string> output_arg(
"o",
"output",
36 "Name of the output raster (*.asc)",
37 true,
"",
"output file name");
39 TCLAP::ValueArg<std::size_t> n_rows(
"r",
"n_rows",
"number of rows",
false,
40 1000,
"positive integer value");
42 TCLAP::ValueArg<std::size_t> n_cols(
"c",
47 "positive integer value");
49 TCLAP::ValueArg<double> cell_size(
"s",
"cell_size",
"cell size",
false,
50 10.0,
"double value");
52 TCLAP::ValueArg<double> ll_y_arg(
55 "y coordinate of lower left point of axis aligned rectangular region",
60 TCLAP::ValueArg<double> ll_x_arg(
63 "x coordinate of lower left point of axis aligned rectangular region",
69 cmd.parse(argc, argv);
80 std::vector<double> raster_data(header.n_cols * header.n_rows, 0.0);
81 GeoLib::Raster const raster{header, raster_data.begin(), raster_data.end()};
84 output_arg.getValue());