Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Aug 9, 2024
1 parent c8442c2 commit 9d2ea68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agrolib/project/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4889,7 +4889,6 @@ bool Project::waterTableAssignMeteoData(Crit3DMeteoPoint* linkedMeteoPoint, QDat
}



bool Project::assignAltitudeToAggregationPoints()
{
if (! DEM.isLoaded)
Expand Down Expand Up @@ -4950,6 +4949,8 @@ bool Project::assignAltitudeToAggregationPoints()
aggregationDEM = new(gis::Crit3DRasterGrid);
gis::resampleGrid(DEM, aggregationDEM, aggregationRaster->header, aggrAverage, 0.1f);

setProgressBar("Compute altitude..", nrMeteoPoints);

// compute average altitude from aggregation DEM
for (int i = 0; i < nrMeteoPoints; i++)
{
Expand Down Expand Up @@ -4977,8 +4978,11 @@ bool Project::assignAltitudeToAggregationPoints()
float altitude = statistics::mean(values);
QString query = QString("UPDATE point_properties SET altitude = %1 WHERE id_point = '%2'").arg(altitude).arg(idStr);
aggregationDbHandler->db().exec(query);

updateProgressBar(i);
}

closeMeteoPointsDB();
return true;
}

0 comments on commit 9d2ea68

Please sign in to comment.