#3100 Well Path Import : Improve test of valid values before adding well path point

This commit is contained in:
Magne Sjaastad 2018-06-29 11:19:05 +02:00
parent ede6ebef90
commit bb91a79515

View File

@ -210,17 +210,8 @@ void RifWellPathImporter::readAllAsciiWellData(const QString& filePath)
if (stream.good()) // If we can, assume this line is a well point entry
{
stream >> y >> tvd >> md;
if (!stream.eof() && !stream.good())
{
// -999 or otherwise to few numbers before some word
if (x != -999)
{
// Error in file: missing numbers at this line
}
stream.clear();
}
else
if (x != HUGE_VAL && y != HUGE_VAL && tvd != HUGE_VAL && md != HUGE_VAL)
{
if (!fileWellDataArray.size())
{
@ -234,6 +225,17 @@ void RifWellPathImporter::readAllAsciiWellData(const QString& filePath)
hasReadWellPointInCurrentWell = true;
}
if (!stream.good())
{
// -999 or otherwise to few numbers before some word
if (x != -999)
{
// Error in file: missing numbers at this line
}
stream.clear();
}
}
else
{