26int main(
int argc,
char* argv[])
29 "Create a raster of specified size at specified origin where every "
30 "pixel has the value zero.\n\n"
31 "OpenGeoSys-6 software, version " +
34 "Copyright (c) 2012-2024, OpenGeoSys Community "
35 "(http://www.opengeosys.org)",
38 TCLAP::ValueArg<std::string> output_arg(
"o",
"output",
39 "Name of the output raster (*.asc)",
40 true,
"",
"output file name");
42 TCLAP::ValueArg<std::size_t> n_rows(
"r",
"n_rows",
"number of rows",
false,
43 1000,
"positive integer value");
45 TCLAP::ValueArg<std::size_t> n_cols(
"c",
50 "positive integer value");
52 TCLAP::ValueArg<double> cell_size(
"s",
"cell_size",
"cell size",
false,
53 10.0,
"double value");
55 TCLAP::ValueArg<double> ll_y_arg(
58 "y coordinate of lower left point of axis aligned rectangular region",
63 TCLAP::ValueArg<double> ll_x_arg(
66 "x coordinate of lower left point of axis aligned rectangular region",
72 cmd.parse(argc, argv);
75 MPI_Init(&argc, &argv);
85 std::vector<double> raster_data(header.n_cols * header.n_rows, 0.0);
86 GeoLib::Raster const raster{header, raster_data.begin(), raster_data.end()};
89 output_arg.getValue());