WSL/SLF GitLab Repository

Commit 46f472ae authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Small cleanup for the USER algorithm

parent 2c5fbb8d
......@@ -953,20 +953,18 @@ double USERInterpolation::getQualityRating(const Date& i_date, const MeteoData::
cerr << "[E] Invalid grid filename for "+algo+" interpolation algorithm: " << filename << "\n";
return 0.0;
}
if (IOUtils::fileExists(filename)) {
return 1.0;
} else {
return 0.0;
}
return (IOUtils::fileExists(filename))? 1. : 0.;
}
void USERInterpolation::calculate(const DEMObject& dem, Grid2DObject& grid)
{
info.clear();
info.str(filename);
info.clear(); info.str("");
gridsmanager.read2DGrid(grid, filename);
if (!grid.isSameGeolocalization(dem)) {
throw InvalidArgumentException("[E] trying to load a grid(" + filename + ") that has not the same georeferencing as the DEM!", AT);
} else {
info << filename;
}
}
......
Supports Markdown
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