CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
assign_landforms.cpp
Go to the documentation of this file.
1
12
13/*===============================================================================================================================
14
15This file is part of CoastalME, the Coastal Modelling Environment.
16
17CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
18
19This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23===============================================================================================================================*/
24#include <assert.h>
25
26#include <iostream>
27using std::cout;
28using std::cerr;
29using std::endl;
30
31#include "cme.h"
32#include "simulation.h"
33#include "coast.h"
34#include "cliff.h"
35#include "drift.h"
36#include "intervention.h"
37
38//===============================================================================================================================
40//===============================================================================================================================
42{
43 // For each coastline, put a coastal landform at every point along the coastline
44 for (int nCoast = 0; nCoast < static_cast<int>(m_VCoast.size()); nCoast++)
45 {
46 for (int j = 0; j < m_VCoast[nCoast].nGetCoastlineSize(); j++)
47 {
48 // Get the coords of the grid cell marked as coastline for the coastal landform object
49 int nX = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX();
50 int nY = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
51
52 // Store the coastline number and the number of the coastline point in the cell so we can get these quickly later
53 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCoast(nCoast);
54 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetPointOnCoast(j);
55
56 // OK, start assigning coastal landforms. First, is there an intervention here?
57 if (bIsInterventionCell(nX, nY) || m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight() > 0)
58 {
59 // There is, so create an intervention object on the vector coastline with these attributes
60 CACoastLandform* pIntervention = new CRWIntervention(&m_VCoast[nCoast], nCoast, j);
61 m_VCoast[nCoast].AppendCoastLandform(pIntervention);
62
63// LogStream << j << " [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "} " << m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() << " " << m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight() << endl;
64
65 continue;
66 }
67
68 // OK this landform is something other than an intervention. So check what we have at SWL on this cell: is it unconsolidated or consolidated sediment? Note that layer 0 is the first layer above basement
69 int nLayer = m_pRasterGrid->m_Cell[nX][nY].nGetLayerAtElev(m_dThisIterSWL);
70 if (nLayer == ELEV_IN_BASEMENT)
71 {
72 // Should never happen
73 LogStream << m_ulIter << ": SWL (" << m_dThisIterSWL << ") is in basement on cell [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}, cannot assign coastal landform for coastline " << nCoast << endl;
74
76 }
77 else if (nLayer == ELEV_ABOVE_SEDIMENT_TOP)
78 {
79 // Again, should never happen
80 LogStream << m_ulIter << ": SWL (" << m_dThisIterSWL << ") is above sediment-top elevation (" << m_pRasterGrid->m_Cell[nX][nY].dGetSedimentTopElev() << ") on cell [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}, cannot assign coastal landform for coastline " << nCoast << endl;
81
83 }
84
85 double dConsSedTop = m_pRasterGrid->m_Cell[nX][nY].dGetConsSedTopForLayerAboveBasement(nLayer);
86 bool bConsSedAtSWL = false;
87 if (dConsSedTop >= m_dThisIterSWL)
88 bConsSedAtSWL = true;
89
90 if (m_ulIter == 1)
91 {
92 // The first timestep: no coastal landforms (other than interventions) already exist, so no grid cells are flagged with coastal landform attributes. So we must update the grid now using the initial values for the coastal landform object's attributes, ready for nLandformToGrid() at the end of the first timestep
93 if (bConsSedAtSWL)
94 {
95 // First timestep: we have consolidated sediment at SWL, so this is a cliff cell. Set some initial values for the cliff object's attributes
96 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
97 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchBaseElev(m_dThisIterSWL);
98 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchDepth(0);
99 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffRemaining(m_dCellSide);
100
101 // Create a cliff object on the vector coastline with these attributes
102 CACoastLandform* pCliff = new CRWCliff(&m_VCoast[nCoast], nCoast, j, m_dCellSide, 0, m_dThisIterSWL, 0);
103 m_VCoast[nCoast].AppendCoastLandform(pCliff);
104
105// LogStream << m_ulIter << ": CLIFF CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
106 }
107 else
108 {
109 // First timestep: we have unconsolidated sediment at SWL, so this is a drift cell: create a drift object on the vector coastline with these attributes
110 CACoastLandform* pDrift = new CRWDrift(&m_VCoast[nCoast], nCoast, j);
111 m_VCoast[nCoast].AppendCoastLandform(pDrift);
112
113 // Safety check
114 if (m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() != LF_CAT_DRIFT)
115 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_DRIFT_MIXED);
116
117// LogStream << m_ulIter << ": DRIFT CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
118 }
119 }
120
121 else
122 {
123 // This not the first timestep
124 if (bConsSedAtSWL)
125 {
126 // We have consolidated sediment at SWL, so this is a cliff cell. Set some default values
127 double dAccumWaveEnergy = 0;
128 double dNotchBaseElev = m_dThisIterSWL;
129 double dNotchDepth = 0;
130 double dRemaining = m_dCellSide;
131
132 // Get the existing landform category of this cell
133 if (m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() == LF_CAT_CLIFF)
134 {
135 // This cell was a cliff in a previous timestep, so get the data stored in the cell, this will be stored in the cliff object on the vector coastline
136 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
137 dAccumWaveEnergy = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetAccumWaveEnergy();
138 dNotchDepth = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetCliffNotchDepth();
139 dNotchBaseElev = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetCliffNotchBaseElev();
140 // dRemaining = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetCliffRemaining();
141
142// LogStream << m_ulIter << ": CLIFF RE-CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
143 }
144 else
145 {
146 // This cell was not a cliff object in a previous timestep, so mark it as one now and set the cell with the default values for the cliff object's attributes
147 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
148 dAccumWaveEnergy = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetAccumWaveEnergy();
149 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchDepth(dNotchDepth);
150 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchBaseElev(dNotchBaseElev);
151 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffRemaining(dRemaining);
152
153// LogStream << m_ulIter << ": CLIFF CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
154 }
155
156 // Create a cliff object on the vector coastline with these attributes
157 CACoastLandform* pCliff = new CRWCliff(&m_VCoast[nCoast], nCoast, j, m_dCellSide, dNotchDepth, dNotchBaseElev, dAccumWaveEnergy);
158 m_VCoast[nCoast].AppendCoastLandform(pCliff);
159 }
160 else
161 {
162 // We have unconsolidated sediment at SWL, so this is a drift cell: create a drift object on the vector coastline with these attributes
163 CACoastLandform* pDrift = new CRWDrift(&m_VCoast[nCoast], nCoast, j);
164 m_VCoast[nCoast].AppendCoastLandform(pDrift);
165
166 // Safety check
167 if (m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() != LF_CAT_DRIFT)
168 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_DRIFT_MIXED);
169
170// LogStream << m_ulIter << ": DRIFT CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
171 }
172 }
173 }
174 }
175
176// // DEBUG CODE ============================================================================================================================================
177// for (int i = 0; i < static_cast<int>(m_VCoast.size()); i++)
178// {
179// for (int j = 0; j < m_VCoast[i].nGetCoastlineSize(); j++)
180// {
181// int
182// nX = m_VCoast[i].pPtiGetCellMarkedAsCoastline(j)->nGetX(),
183// nY = m_VCoast[i].pPtiGetCellMarkedAsCoastline(j)->nGetY();
184//
185// LogStream << m_ulIter << ": coast cell " << j << " at [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "} has landform category = ";
186//
187// int
188// nCat = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory(),
189// nSubCat = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFSubCategory();
190//
191// switch (nCat)
192// {
193// case LF_CAT_HINTERLAND:
194// LogStream << "hinterland";
195// break;
196//
197// case LF_CAT_SEA:
198// LogStream << "sea";
199// break;
200//
201// case LF_CAT_CLIFF:
202// LogStream << "cliff";
203// break;
204//
205// case LF_CAT_DRIFT:
206// LogStream << "drift";
207// break;
208//
209// case LF_CAT_INTERVENTION:
210// LogStream << "intervention";
211// break;
212//
213// case LF_NONE:
214// LogStream << "none";
215// break;
216//
217// default:
218// LogStream << "NONE";
219// break;
220// }
221//
222// LogStream << " and landform subcategory = ";
223//
224// switch (nSubCat)
225// {
226// case LF_SUBCAT_CLIFF_ON_COASTLINE:
227// LogStream << "cliff on coastline";
228// break;
229//
230// case LF_SUBCAT_CLIFF_INLAND:
231// LogStream << "cliff inland";
232// break;
233//
234// case LF_SUBCAT_DRIFT_MIXED:
235// LogStream << "mixed drift";
236// break;
237//
238// case LF_SUBCAT_DRIFT_TALUS:
239// LogStream << "talus";
240// break;
241//
242// case LF_SUBCAT_DRIFT_BEACH:
243// LogStream << "beach";
244// break;
245//
246// case LF_SUBCAT_DRIFT_DUNES:
247// LogStream << "dunes";
248// break;
249//
250// case LF_SUBCAT_INTERVENTION_STRUCT:
251// LogStream << "structural intervention";
252// break;
253//
254// case LF_SUBCAT_INTERVENTION_NON_STRUCT:
255// LogStream << "non-structural intervention";
256// break;
257//
258// case LF_NONE:
259// LogStream << "none";
260// break;
261//
262// default:
263// LogStream << "NONE";
264// break;
265// }
266// LogStream << endl;
267// }
268// }
269// // DEBUG CODE ============================================================================================================================================
270
271 return RTN_OK;
272}
273
274//===============================================================================================================================
276//===============================================================================================================================
277int CSimulation::nLandformToGrid(int const nCoast, int const nPoint)
278{
279 // What is the coastal landform here?
280 CACoastLandform* pCoastLandform = m_VCoast[nCoast].pGetCoastLandform(nPoint);
281 int nCategory = pCoastLandform->nGetLandFormCategory();
282
283 if (nCategory == LF_CAT_CLIFF)
284 {
285 // It's a cliff
286 CRWCliff const* pCliff = reinterpret_cast<CRWCliff*>(pCoastLandform);
287
288 int nX = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(nPoint)->nGetX();
289 int nY = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(nPoint)->nGetY();
290
291 if (! pCliff->bHasCollapsed())
292 {
293 // The cliff has not collapsed. Get attribute values from the cliff object
294 double dNotchBaseElev = pCliff->dGetNotchBaseElev();
295 double dNotchDepth = pCliff->dGetNotchDepth();
296 double dRemaining = pCliff->dGetRemaining();
297
298 // And store some attribute values in the cliff cell
299 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
300 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchBaseElev(dNotchBaseElev);
301 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchDepth(dNotchDepth);
302 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffRemaining(dRemaining);
303 }
304 else
305 {
306 // The cliff has collapsed: all sediment above the base of the erosional notch is gone from this cliff object via cliff collapse, so this cell is no longer a cliff
307 m_pRasterGrid->m_Cell[nX][nY].SetInContiguousSea();
308
309 // Check the x-y extremities of the contiguous sea for the bounding box (used later in wave propagation)
310 if (nX < m_nXMinBoundingBox)
312
313 if (nX > m_nXMaxBoundingBox)
315
316 if (nY < m_nYMinBoundingBox)
318
319 if (nY > m_nYMaxBoundingBox)
321
322// LogStream << m_ulIter << ": CLIFF REMOVED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "} is no longer a cliff landform" << endl;
323
324 int nTopLayer = m_pRasterGrid->m_Cell[nX][nY].nGetTopLayerAboveBasement();
325
326 // Safety check
327 if (nTopLayer == INT_NODATA)
329
330 // Update the cell's layer elevations
331 m_pRasterGrid->m_Cell[nX][nY].CalcAllLayerElevsAndD50();
332
333 // And update the cell's sea depth
334 m_pRasterGrid->m_Cell[nX][nY].SetSeaDepth();
335 }
336
337 // Always accumulate wave energy
338 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetAccumWaveEnergy(pCliff->dGetTotAccumWaveEnergy());
339 }
340
341 else if (nCategory == LF_CAT_DRIFT)
342 {
343 // It's drift, so calculate D50 TODO 002 Why might we need this?
344
345 }
346
347 return RTN_OK;
348}
349
350//===============================================================================================================================
352//===============================================================================================================================
354{
355 // Go through all cells in the RasterGrid array
356 for (int nX = 0; nX < m_nXGridSize; nX++)
357 {
358 for (int nY = 0; nY < m_nYGridSize; nY++)
359 {
360 // Get this cell's landform category
361 CRWCellLandform* pLandform = m_pRasterGrid->m_Cell[nX][nY].pGetLandform();
362 int nCat = pLandform->nGetLFCategory();
363
364 if (m_pRasterGrid->m_Cell[nX][nY].bBasementElevIsMissingValue())
365 {
366 // Set to unknown landform
367 pLandform->SetLFCategory(LF_NONE);
368 continue;
369 }
370
372 {
373 if (m_pRasterGrid->m_Cell[nX][nY].bIsInundated())
374 {
376 m_pRasterGrid->m_Cell[nX][nY].SetInContiguousSea();
377 }
378 else
379 {
381 }
382 continue;
383 }
384
385 if (nCat == LF_CAT_SEA)
386 {
387 // This is a sea cell. Is it surrounded by drift cells, or drift and cliff?
388 if (bSurroundedByDriftCells(nX, nY))
389 {
390 // It is. We can can get 'holes' in the beach (due to rounding issues), so set this cell's landform to beach
392 continue;
393 }
394 else if (m_pRasterGrid->m_Cell[nX][nY].dGetSedimentTopElev() > m_dThisIterSWL)
395 {
396 // This is an island
397 pLandform->SetLFCategory(LF_CAT_ISLAND);
398 continue;
399 }
400 else
401 {
402 // Keep it as sea
403 continue;
404 }
405 }
406
407 // Ok, this cell is either coast or inland
408 if (! m_pRasterGrid->m_Cell[nX][nY].bIsCoastline())
409 {
410 // Is not coastline
411 if (nCat == LF_CAT_CLIFF)
412 {
413 // This was a cliff during the last timestep, but it is no longer on the coastline. So classify it as a former cliff
415
416// LogStream << m_ulIter << ": FORMER CLIFF CREATED from cliff landform [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
417
418 continue;
419 }
420
422 // Do nothing
423 continue;
424
425 // It must be hinterland
427 }
428 }
429 }
430
431 return RTN_OK;
432}
433//===============================================================================================================================
435//===============================================================================================================================
436bool CSimulation::bSurroundedByDriftCells(int const nX, int const nY)
437{
438 int nXTmp;
439 int nYTmp;
440 int nAdjacent = 0;
441
442 // North
443 nXTmp = nX;
444 nYTmp = nY - 1;
445 if (bIsWithinValidGrid(nXTmp, nYTmp))
446 {
447 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
448 int nCat = pLandform->nGetLFCategory();
449 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
450 nAdjacent++;
451 }
452
453 // East
454 nXTmp = nX + 1;
455 nYTmp = nY;
456 if (bIsWithinValidGrid(nXTmp, nYTmp))
457 {
458 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
459 int nCat = pLandform->nGetLFCategory();
460 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
461 nAdjacent++;
462 }
463
464 // South
465 nXTmp = nX;
466 nYTmp = nY + 1;
467 if (bIsWithinValidGrid(nXTmp, nYTmp))
468 {
469 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
470 int nCat = pLandform->nGetLFCategory();
471 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
472 nAdjacent++;
473 }
474
475 // West
476 nXTmp = nX - 1;
477 nYTmp = nY;
478 if (bIsWithinValidGrid(nXTmp, nYTmp))
479 {
480 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
481 int nCat = pLandform->nGetLFCategory();
482 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
483 nAdjacent++;
484 }
485
486 if (nAdjacent == 4)
487 {
488 // This cell has four LF_CAT_DRIFT neighbours
489 return true;
490 }
491
492 return false;
493}
Abstract class, used as a base class for landform objects on the coastline.
double dGetTotAccumWaveEnergy(void) const
Get total accumulated wave energy.
int nGetLandFormCategory(void) const
Get the landform category.
Real-world class used to represent the landform of a cell.
int nGetLFCategory(void) const
Get the landform category.
void SetLFCategory(int const)
Set the landform category.
void SetLFSubCategory(int const)
Set the both the landform sub-category, and the landform category.
Real-world class used to represent the 'cliff' category of coastal landform object.
Definition cliff.h:33
bool bHasCollapsed(void) const
Returns the value of the cliff collapse switch.
Definition cliff.cpp:58
double dGetNotchBaseElev(void) const
Returns the elevation of the base of the erosional notch.
Definition cliff.cpp:70
double dGetNotchDepth(void) const
Returns the horizontal depth of the cliff's erosional notch (the 'overhang')
Definition cliff.cpp:94
double dGetRemaining(void) const
Returns the length (in external CRS units) of the cliff's remaining sediment 'behind' the erosional n...
Definition cliff.cpp:82
Real-world class used to represent the 'drift' category of coastal landform object.
Definition drift.h:33
Real-world class used to represent the 'intervention' category of coastal landform objects.
int m_nYMinBoundingBox
The minimum y value of the bounding box.
Definition simulation.h:500
double m_dThisIterSWL
The still water level for this timestep (this includes tidal changes and any long-term SWL change)
Definition simulation.h:667
CGeomRasterGrid * m_pRasterGrid
Pointer to the raster grid object.
int m_nXGridSize
The size of the grid in the x direction.
Definition simulation.h:431
int nAssignLandformsForAllCoasts(void)
Each timestep, classify coastal landforms and assign a coastal landform object to every point on ever...
ofstream LogStream
vector< CRWCoast > m_VCoast
The coastline objects.
int m_nYGridSize
The size of the grid in the y direction.
Definition simulation.h:434
int m_nXMaxBoundingBox
The maximum x value of the bounding box.
Definition simulation.h:497
double dGridCentroidYToExtCRSY(int const) const
Given the integer Y-axis ordinate of a cell in the raster grid CRS, returns the external CRS Y-axis o...
Definition gis_utils.cpp:71
int nAssignLandformsForAllCells(void)
Each timestep, classify landforms for cells that are not on the coastline.
bool bSurroundedByDriftCells(int const, int const)
Returns true if this cell has four drift cells surrounding it.
int m_nYMaxBoundingBox
The maximum y value of the bounding box.
Definition simulation.h:503
int m_nXMinBoundingBox
The minimum x value of the bounding box.
Definition simulation.h:494
bool bIsWithinValidGrid(int const, int const) const
Checks whether the supplied point (an x-y pair, in the grid CRS) is within the raster grid,...
unsigned long m_ulIter
The number of the current iteration (time step)
Definition simulation.h:553
double dGridCentroidXToExtCRSX(int const) const
Given the integer X-axis ordinate of a cell in the raster grid CRS, returns the external CRS X-axis o...
Definition gis_utils.cpp:62
double m_dCellSide
Length of a cell side (in external CRS units)
Definition simulation.h:613
bool bIsInterventionCell(int const, int const) const
Returns true if the cell is an intervention.
Definition utils.cpp:2736
int nLandformToGrid(int const, int const)
At the end of each timestep, this routine stores the attributes from a single coastal landform object...
Contains CRWCliff definitions.
This file contains global definitions for CoastalME.
int const LF_SUBCAT_DRIFT_BEACH
Definition cme.h:440
int const INT_NODATA
Definition cme.h:362
int const RTN_ERR_NO_TOP_LAYER
Definition cme.h:623
int const LF_CAT_SEA
Definition cme.h:422
int const LF_SUBCAT_CLIFF_ON_COASTLINE
Definition cme.h:434
int const ELEV_ABOVE_SEDIMENT_TOP
Definition cme.h:651
int const LF_CAT_SEDIMENT_INPUT
Definition cme.h:424
int const LF_CAT_SEDIMENT_INPUT_SUBMERGED
Definition cme.h:425
int const LF_CAT_DRIFT
Definition cme.h:430
int const LF_SUBCAT_CLIFF_INLAND
Definition cme.h:435
int const RTN_OK
Definition cme.h:577
int const LF_SUBCAT_DRIFT_MIXED
Definition cme.h:438
int const LF_CAT_SEDIMENT_INPUT_NOT_SUBMERGED
Definition cme.h:426
int const LF_NONE
Definition cme.h:418
int const RTN_ERR_CANNOT_ASSIGN_COASTAL_LANDFORM
Definition cme.h:627
int const ELEV_IN_BASEMENT
Definition cme.h:650
int const LF_CAT_CLIFF
Definition cme.h:429
int const LF_CAT_ISLAND
Definition cme.h:423
int const LF_CAT_HINTERLAND
Definition cme.h:421
int const LF_CAT_INTERVENTION
Definition cme.h:431
Contains CRWCoast definitions.
Contains CRWDrift definitions.
Contains CRWIntervention definitions.
Contains CSimulation definitions.