Subversion Repositories public iLand

Rev

Rev 753 | Rev 775 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 753 Rev 774
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 * 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) );
391
        ok = true;
393
        ok = true;
392
        if (iage>=0)
394
        if (iage>=0)
393
            item.age = infile.value(row, iage).toInt(&ok);
395
            item.age = infile.value(row, iage).toInt(&ok);
394
        if (iage<0 || !ok)
396
        if (iage<0 || !ok)
395
            item.age = 0;
397
            item.age = 0;