Skip to content

Commit

Permalink
fix change dem
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Mar 12, 2024
1 parent 7ad9bb4 commit 388e3be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions agrolib/graphics/mapGraphicsRasterUtm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ void RasterUtmObject::clear()

_rasterPointer = nullptr;
_colorLegendPointer = nullptr;
isLoaded = false;

_utmZone = NODATA;
_refCenterPixel = QPointF(NODATA, NODATA);

isLoaded = false;
}


Expand Down
4 changes: 3 additions & 1 deletion agrolib/project/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,8 @@ bool Project::loadDEM(QString myFileName)
setColorScale(noMeteoTerrain, DEM.colorScale);

// initialize radiation maps (slope, aspect, lat/lon, transmissivity, etc.)
if (radiationMaps != nullptr) radiationMaps->clear();
if (radiationMaps != nullptr)
radiationMaps->clear();
radiationMaps = new Crit3DRadiationMaps(DEM, gisSettings);

// initialize hourly meteo maps
Expand Down Expand Up @@ -1707,6 +1708,7 @@ QDateTime Project::findDbPointFirstTime()
return firstTime;
}


void Project::checkMeteoPointsDEM()
{
for (int i=0; i < nrMeteoPoints; i++)
Expand Down
12 changes: 4 additions & 8 deletions bin/CRITERIA3D/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ void MainWindow::drawProject()

void MainWindow::clearMaps_GUI()
{
rasterDEM->clear();
rasterOutput->clear();
rasterDEM->clear();

ui->labelInputRaster->setText("");
ui->labelOutputRaster->setText("");
Expand Down Expand Up @@ -789,25 +789,21 @@ void MainWindow::on_timeEdit_valueChanged(int myHour)
}



void MainWindow::on_actionLoad_DEM_triggered()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Digital Elevation Model"), "",
tr("ESRI float (*.flt);; ENVI image (*.img)"));

if (fileName == "") return;

rasterDEM->setDrawing(false);
rasterOutput->setDrawing(false);
clearMaps_GUI();

if (! myProject.loadDEM(fileName)) return;

rasterDEM->setDrawing(true);
rasterOutput->setDrawing(true);

this->renderDEM();
renderDEM();
}


void MainWindow::on_actionOpenProject_triggered()
{
QString projectPath = myProject.getDefaultPath() + PATH_PROJECT;
Expand Down

0 comments on commit 388e3be

Please sign in to comment.