Commit 31d08afe authored by Luís de Sousa's avatar Luís de Sousa
Browse files

Output raster file extensions now given by the implementation Grid classes.

parent 724a4a2e
......@@ -57,6 +57,7 @@ namespace CA {
static const char* key_yll;
static const char* key_side;
static const char* key_nodata;
static const std::string file_extension;
//! Read token and value pair from a line of the header of an hexagonal ASCII raster file.
//! .
......@@ -180,7 +181,7 @@ namespace CA {
//Clock total_timer;
// Open file
std::ofstream onfile(filename.c_str());
std::ofstream onfile((filename + file_extension).c_str());
// Check if the file was open.
if (!onfile)
......@@ -240,7 +241,8 @@ namespace CA {
const char* HexAsciiGrid<T>::key_side = "side";
template<typename T>
const char* HexAsciiGrid<T>::key_nodata = "no_data";
template<typename T>
const std::string HexAsciiGrid<T>::file_extension = ".hasc";
}// end of namespace
......
......@@ -184,6 +184,9 @@ namespace CA {
// Get starting time.
//Clock total_timer;
// Add file extension
filename += ".asc";
// Open file
std::ofstream onfile(filename.c_str());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment