Fixed lakes elevation

There were sometimes missing water patches near a lake's edge, when the neighbour catchment area was lower.
This commit allows to divide a cell into several mini-catchment basins, to fill only a part of it with water.
This commit is contained in:
Gael-de-Sailly
2020-12-22 18:34:30 +01:00
parent 9ffa150263
commit 83728cc932
2 changed files with 20 additions and 2 deletions

View File

@ -185,7 +185,7 @@ local function make_polygons(minp, maxp)
local poly_dem = {dem[iA], dem[iB], dem[iC], dem[iD]}
polygon.dem = poly_dem
polygon.lake = math.min(lakes[iA], lakes[iB], lakes[iC], lakes[iD])
polygon.lake = {lakes[iA], lakes[iB], lakes[iC], lakes[iD]}
-- Now, rivers.
-- Load river flux values for the 4 corners