Rev 774 | Rev 777 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 774 | Rev 775 | ||
---|---|---|---|
Line 386... | Line 386... | ||
386 | item.count = infile.value(row, icount).toInt(); |
386 | item.count = infile.value(row, icount).toInt(); |
387 | total_count += item.count; |
387 | total_count += item.count; |
388 | item.dbh_from = infile.value(row, idbh_from).toDouble(); |
388 | item.dbh_from = infile.value(row, idbh_from).toDouble(); |
389 | item.dbh_to = infile.value(row, idbh_to).toDouble(); |
389 | item.dbh_to = infile.value(row, idbh_to).toDouble(); |
390 | item.hd = infile.value(row, ihd).toDouble(); |
390 | item.hd = infile.value(row, ihd).toDouble(); |
391 | if (item.hd==0. || item.dbh_from |
391 | if (item.hd==0. || item.dbh_from / 100. * item.hd < 4.) |
392 | throw IException(QString("load init file: file '%1' tries to init trees below 4m height. hd=%2, dbh=%3.").arg(fileName).arg(item.hd).arg(item.dbh_from) ); |
392 | throw IException(QString("load init file: file '%1' tries to init trees below 4m height. hd=%2, dbh=%3.").arg(fileName).arg(item.hd).arg(item.dbh_from) ); |
393 | ok = true; |
393 | ok = true; |
394 | if (iage>=0) |
394 | if (iage>=0) |
395 | item.age = infile.value(row, iage).toInt(&ok); |
395 | item.age = infile.value(row, iage).toInt(&ok); |
396 | if (iage<0 || !ok) |
396 | if (iage<0 || !ok) |