Is it necessary to provide such strict check for cell squareness? Providing in other environments (R) identical resolution in X and Y still gets a difference of 2.415845e-13 which is still higher then epsilon, thus throwing an error. Considering we are working with metric units, would it make more sense to provide a less stringent threshold such as 10e-6 ? I am referring to parts such as the ones below:
double epsilon = std::numeric_limits<double>::epsilon();
if (fabs(cellSizeX - cellSizeY) > epsilon)
{
throw std::runtime_error("Error: Cells are not square in: '" + filename + "'");
}
would be more practical to convert to :
double epsilon = 0.000001;
if (fabs(cellSizeX - cellSizeY) > epsilon)
{
throw std::runtime_error("Error: Cells are not square in: '" + filename + "'");
}
Is it necessary to provide such strict check for cell squareness? Providing in other environments (R) identical resolution in X and Y still gets a difference of 2.415845e-13 which is still higher then epsilon, thus throwing an error. Considering we are working with metric units, would it make more sense to provide a less stringent threshold such as 10e-6 ? I am referring to parts such as the ones below:
would be more practical to convert to :