Subversion Repositories public iLand

Rev

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

Rev 739 Rev 743
Line 96... Line 96...
96
    if (height_grid_enabled) {
96
    if (height_grid_enabled) {
97
        QString init_height_grid_file = GlobalSettings::instance()->path(xml.value("heightGrid.fileName"), "init");
97
        QString init_height_grid_file = GlobalSettings::instance()->path(xml.value("heightGrid.fileName"), "init");
98
        qDebug() << "initialization: using predefined tree heights map" << init_height_grid_file;
98
        qDebug() << "initialization: using predefined tree heights map" << init_height_grid_file;
99
99
100
        QScopedPointer<const MapGrid> p(new MapGrid(init_height_grid_file, false));
100
        QScopedPointer<const MapGrid> p(new MapGrid(init_height_grid_file, false));
-
 
101
        if (!p->isValid()) {
-
 
102
            throw IException(QString("Error when loading grid with tree heights for stand initalization: file %1 not found or not valid.").arg(init_height_grid_file));
-
 
103
        }
101
        height_grid.swap(p);
104
        height_grid.swap(p);
102
        mInitHeightGrid = height_grid.data();
105
        mInitHeightGrid = height_grid.data();
103
106
104
        QString expr=xml.value("heightGrid.fitFormula", "polygon(x, 0,0, 0.8,1, 1.1, 1, 1.25,0)");
107
        QString expr=xml.value("heightGrid.fitFormula", "polygon(x, 0,0, 0.8,1, 1.1, 1, 1.25,0)");
105
        mHeightGridResponse = new Expression(expr);
108
        mHeightGridResponse = new Expression(expr);