52#include <ogrsf_frmts.h>
136 return hypot(dXDist, dYDist);
143 double dXDist = Pti1->
nGetX() - Pti2->
nGetX();
144 double dYDist = Pti1->
nGetY() - Pti2->
nGetY();
146 return hypot(dXDist, dYDist);
166 if (
m_pRasterGrid->m_Cell[nX][nY].bBasementElevIsMissingValue())
176 int nX = Pti->
nGetX();
177 int nY = Pti->
nGetY();
218 int nDiffX = nX0 - nX1;
219 int nDiffY = nY0 - nY1;
228 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
238 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
244 else if (nDiffY == 0) {
251 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
261 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
269 int nXDistanceOutside = 0;
270 int nYDistanceOutside = 0;
273 nXDistanceOutside = -nX1;
279 nYDistanceOutside = -nY1;
284 if (nXDistanceOutside >= nYDistanceOutside) {
293 nY1 = nY0 +
nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
306 nY1 = nY0 +
nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
322 nX1 = nX0 +
nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
335 nX1 = nX0 +
nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
348 double dNewAngle = dAngle;
351 while (dNewAngle < 0)
355 while (dNewAngle > 360)
365 double dPt1X = pPt1->
dGetX();
366 double dPt1Y = pPt1->
dGetY();
367 double dPt2X = pPt2->
dGetX();
368 double dPt2Y = pPt2->
dGetY();
369 double dPtAvgX = (dPt1X + dPt2X) / 2;
370 double dPtAvgY = (dPt1Y + dPt2Y) / 2;
394 int nPti1X = pPti1->
nGetX();
395 int nPti1Y = pPti1->
nGetY();
396 int nPti2X = pPti2->
nGetX();
397 int nPti2Y = pPti2->
nGetY();
398 double dOtherWeight = 1.0 - dWeight;
400 int nPtiWeightAvgX =
nRound((dWeight * nPti2X) + (dOtherWeight * nPti1X));
401 int nPtiWeightAvgY =
nRound((dWeight * nPti2Y) + (dOtherWeight * nPti1Y));
410 int nSize =
static_cast<int>(pVIn->size());
418 for (
int n = 0; n < nSize; n++) {
419 dAvgX += pVIn->at(n).dGetX();
420 dAvgY += pVIn->at(n).dGetY();
458 int nSize =
static_cast<int>(pVIn->size());
465 double dSignedArea = 0.0;
468 for (
int i = 0; i < nSize - 1; ++i) {
469 nX0 = pVIn->at(i).nGetX();
470 nY0 = pVIn->at(i).nGetY();
471 nX1 = pVIn->at(i + 1).nGetX();
472 nY1 = pVIn->at(i + 1).nGetY();
474 dA = (nX0 * nY1) - (nX1 * nY0);
476 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
480 nX0 = pVIn->at(nSize - 1).nGetX();
481 nY0 = pVIn->at(nSize - 1).nGetY();
482 nX1 = pVIn->at(0).nGetX();
483 nY1 = pVIn->at(0).nGetY();
485 dA = (nX0 * nY1) - (nX1 * nY0);
487 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
490 PtiCentroid.
DivXDivY(6.0 * dSignedArea, 6.0 * dSignedArea);
532 double dXLen = PtNext->
dGetX() - PtStart->
dGetX();
533 double dYLen = PtNext->
dGetY() - PtStart->
dGetY();
543 dLength = hypot(dXLen, dYLen);
545 double dScaleFactor = dDesiredLength / dLength;
551 EndPt.
SetX(PtStart->
dGetX() + (dScaleFactor * dYLen));
552 EndPt.
SetY(PtStart->
dGetY() - (dScaleFactor * dXLen));
556 EndPt.
SetX(PtStart->
dGetX() - (dScaleFactor * dYLen));
557 EndPt.
SetY(PtStart->
dGetY() + (dScaleFactor * dXLen));
567 double dXLen = PtiNext->
nGetX() - PtiStart->
nGetX();
568 double dYLen = PtiNext->
nGetY() - PtiStart->
nGetY();
578 dLength = hypot(dXLen, dYLen);
580 double dScaleFactor = dDesiredLength / dLength;
602 double dXLen = nNextX - nStartX;
603 double dYLen = nNextY - nStartY;
613 dLength = hypot(dXLen, dYLen);
615 double dScaleFactor = dDesiredLength / dLength;
621 EndPti.
SetX(nStartX +
nRound(dScaleFactor * dYLen));
622 EndPti.
SetY(nStartY -
nRound(dScaleFactor * dXLen));
626 EndPti.
SetX(nStartX -
nRound(dScaleFactor * dYLen));
627 EndPti.
SetY(nStartY +
nRound(dScaleFactor * dXLen));
642 dDotProduct = dXDistBtoA * dXDistCtoA + dYDistBtoA * dYDistCtoA,
643 dPseudoCrossProduct = dXDistBtoA * dYDistCtoA - dYDistBtoA * dXDistCtoA,
644 dAngle = atan2(dPseudoCrossProduct, dDotProduct);
663 if (NULL == pDriver) {
670 char **papszMetadata = pDriver->GetMetadata();
677 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_RASTER, FALSE)) {
684 string strTmp = CSLFetchNameValue(papszMetadata,
"DMD_LONGNAME");
686 strTmp = CSLFetchNameValue(papszMetadata,
"DMD_EXTENSIONS");
690 long unsigned int nPos = strTmp.find(
SPACE);
692 if (nPos == string::npos) {
706 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE, FALSE)) {
708 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATECOPY, FALSE)) {
709 cerr <<
ERR <<
"Cannot write using raster GDAL driver '" <<
m_strRasterGISOutFormat <<
" since neither Create() or CreateCopy() are supported'. Choose another GDAL raster format." << endl;
718 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Float")) {
723 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"UInt32")) {
736 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Int32")) {
749 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"UInt16")) {
762 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Int16")) {
775 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Byte")) {
789 cerr <<
ERR <<
"Cannot write using raster GDAL driver '" <<
m_strRasterGISOutFormat <<
", not even byte output is supported'. Choose another GIS raster format." << endl;
800 if (NULL == pDriver) {
807 char **papszMetadata = pDriver->GetMetadata();
810 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_VECTOR, FALSE)) {
816 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE, FALSE)) {
818 cerr <<
ERR <<
"Cannot write vector GIS files using GDAL driver '" <<
m_strRasterGISOutFormat <<
"'. Choose another format." << endl;
862 double dLastInterval;
994 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++) {
1027 for (
int i = 0; i < static_cast<int>(
m_VdSliceElev.size()); i++) {
1323 switch (nDataItem) {
1325 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetLayerAtElev(dElev);
1329 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory();
1336 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFSubCategory();
1341 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight();
1399 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetBeachProtectionFactor();
1407 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialPlatformErosion();
1411 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualPlatformErosion();
1415 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialPlatformErosion();
1419 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualPlatformErosion();
1423 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialBeachErosion();
1427 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualBeachErosion();
1431 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialBeachErosion();
1435 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualBeachErosion();
1443 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotBeachDeposition();
1447 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetSuspendedSediment();
1455 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetFineDepth();
1459 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetSandDepth();
1463 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetCoarseDepth();
1467 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetFineDepth();
1471 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetSandDepth();
1475 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetCoarseDepth();
1479 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionFine();
1483 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionSand();
1487 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionCoarse();
1491 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseFine();
1495 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseSand();
1499 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseCoarse();
1503 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseSandTalusDeposition();
1507 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseCoarseTalusDeposition();
1511 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotSandTalusDeposition();
1515 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCoarseTalusDeposition();
1519 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetShadowZoneNumber();
1523 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1527 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1531 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1541 dTmp =
m_pVCoastPolygon[nPoly]->dGetBeachDepositionAndSuspensionAllUncons();
1565 if (strDriver ==
"aaigrid") {
1568 else if (strDriver ==
"bmp") {
1571 else if (strDriver ==
"gtiff") {
1579 else if (strDriver ==
"hfa") {
1583 else if (strDriver ==
"jpeg") {
1588 else if (strDriver ==
"png") {
1599 else if (strDriver ==
"rst") {
1603 else if (strDriver ==
"geojson") {
1607 else if (strDriver ==
"gpkg") {
1613 else if (strDriver ==
"netcdf") {
1621 switch (nDirection) {
1678 unsigned int nMinSqDist = UINT_MAX;
1682 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++) {
1683 for (
int j = 0; j <
m_VCoast[nCoast].nGetCoastlineSize(); j++) {
1686 nXCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX(),
1687 nYCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
1691 nXDist = nX - nXCoast,
1692 nYDist = nY - nYCoast;
1694 unsigned int nSqDist = (nXDist * nXDist) + (nYDist * nYDist);
1697 if (nSqDist < nMinSqDist) {
1698 nMinSqDist = nSqDist;
1699 PtiCoastPoint.
SetXY(nXCoast, nYCoast);
1704 return PtiCoastPoint;
Geometry class used to represent 2D point objects with integer coordinates.
void SetY(int const)
The integer parameter sets a value for the CGeom2DIPoint object's Y coordinate.
int nGetY(void) const
Returns the CGeom2DIPoint object's integer Y coordinate.
void SetXY(int const, int const)
The two integer parameters set values for the CGeom2DIPoint object's X and Y coordinates.
void DivXDivY(double const, double const)
Divides the CGeom2DIPoint object's X coordinate by the first double parameter (rounded),...
void SetX(int const)
The integer parameter sets a value for the CGeom2DIPoint object's X coordinate.
int * pnGetY()
Returns a reference to the CGeom2DIPoint object's integer Y coordinate.
void AddXAddY(int const, int const)
The parameter is a pointer to a CGeom2DIPoint object, this is used to set values for the CGeom2DIPoin...
int * pnGetX()
Returns a reference to the CGeom2DIPoint object's integer X coordinate.
int nGetX(void) const
Returns the CGeom2DIPoint object's integer X coordinate.
Geometry class used to represent 2D point objects with floating-point coordinates.
void SetY(double const)
The double parameter sets a value for the CGeom2DIPoint object's Y coordinate.
double dGetY(void) const
Returns the CGeom2DPoint object's double Y coordinate.
double dGetX(void) const
Returns the CGeom2DPoint object's double X coordinate.
void SetX(double const)
The double parameter sets a value for the CGeom2DIPoint object's X coordinate.
bool m_bCliffCollapseSave
Save cliff collapse raster GIS files?
bool m_bAvgSeaDepthSave
Save average sea depth raster GIS files?
bool m_bDeepWaterWaveAngleSave
Save deep water wave angle raster GIS files?
bool bWriteRasterGISFile(int const, string const *, int const =0, double const =0)
Writes GIS raster files using GDAL, using data from the RasterGrid array.
bool m_bTopSurfSave
Save fop surface (sediment and sea) raster DEMs?
string m_strOGRVectorOutputExtension
GDAL-OGR vector output drive file extension.
bool bCheckRasterGISOutputFormat(void)
Checks whether the selected raster GDAL driver supports file creation, 32-bit doubles,...
bool m_bSedimentTopSurfSave
Save sediment top surface raster DEMs?
bool m_bFineUnconsSedSave
Save fine unconsolidated sediment raster GIS files?
void GetRasterOutputMinMax(int const, double &, double &, int const, double const)
Finds the max and min values in order to scale raster output if we cannot write doubles.
CGeomRasterGrid * m_pRasterGrid
Pointer to the raster grid object.
int m_nXGridSize
The size of the grid in the x direction.
static int nGetOppositeDirection(int const)
Returns the opposite direction.
CGeom2DIPoint PtiExtCRSToGridRound(CGeom2DPoint const *) const
Transforms a pointer to a CGeom2DPoint in the external CRS to the equivalent CGeom2DIPoint in the ras...
vector< CRWCoast > m_VCoast
The coastline objects.
bool bSaveAllVectorGISFiles(void)
The bSaveAllvectorGISFiles member function saves the vector GIS files TODO 081 Choose more files to o...
int m_nThisSave
Used in calculations of GIS save intervals.
static string strGetComputerName(void)
Returns a string, hopefully giving the name of the computer on which the simulation is running.
bool m_bAvgWaveAngleAndHeightSave
Save average wave angle and average wave height raster GIS files?
bool m_bAvgWaveAngleSave
Save average wave angle raster GIS files?
bool m_bCliffEdgeSave
Save cliff edge vector GIS files?
bool bWriteVectorGISFile(int const, string const *)
Writes vector GIS files using OGR.
bool m_bInvalidNormalsSave
Save invalid coastline-normal vector GIS files?
bool m_bShadowBoundarySave
Save wave shadow boundary vector GIS files?
vector< CGeomCoastPolygon * > m_pVCoastPolygon
bool m_bActualBeachErosionSave
int m_nYGridSize
The size of the grid in the y direction.
bool m_bRunUpSave
Are we saving runup? TODO 007.
GDALDataType m_GDALWriteIntDataType
bool m_bCliffCollapseDepositionSave
Save cliff collapse deposition raster GIS files?
bool m_bTotalActualPlatformErosionSave
bool m_bPolygonUnconsSedUpOrDownDriftSave
Save polygon unconsolidated sediment up- or down-drift raster GIS files?
double m_dGeoTransform[6]
static CGeom2DIPoint PtiGetPerpendicular(CGeom2DIPoint const *, CGeom2DIPoint const *, double const, int const)
Returns a CGeom2DIPoint (grid CRS) which is the 'other' point of a two-point vector passing through P...
string m_strVectorGISOutFormat
Base name for CME vector GIS output files.
double m_dMissingValue
Used by CoastalME for floating-point missing values.
static double dGetDistanceBetween(CGeom2DPoint const *, CGeom2DPoint const *)
Returns the distance (in external CRS) between two points.
bool m_bBasementElevSave
Save basement raster DEMs?
static CGeom2DPoint PtAverage(CGeom2DPoint const *, CGeom2DPoint const *)
Returns a point (external CRS) which is the average of (i.e. is midway between) two other external CR...
bool m_bCoarseUnconsSedSave
Save coarse unconsolidated sediment raster GIS files?
static double dKeepWithin360(double const)
Constrains the supplied angle to be within 0 and 360 degrees.
bool m_bPotentialPlatformErosionMaskSave
Save potential platform erosion mask raster GIS files?
void KeepWithinValidGrid(int &, int &) const
Constrains the supplied point (in the grid CRS) to be a valid cell within the raster grid.
bool m_bWaveHeightSave
Save wave height raster GIS files?
bool m_bGDALCanCreate
Is the selected GDAL output file format capable of writing files?
bool m_bLandformSave
Save coast landform raster GIS files?
static string strTrim(string const *)
Trims whitespace from both sides of a string, does not change the original string.
string m_strRasterGISOutFormat
Base name for CME raster GIS output files.
bool m_bTotalBeachDepositionSave
Save total beach (unconsolidated sediment) deposition raster GIS files?
bool m_bSandUnconsSedSave
Save sand unconsolidated sediment raster GIS files?
bool m_bTotCliffCollapseSave
Save total cliff collapse raster GIS files?
bool m_bCliffSave
Save cliff region raster grids?
bool m_bDoShorePlatformErosion
Simulate shore platform erosion?
bool m_bSliceSave
Save slices?
bool m_bRasterPolygonSave
Save raster polygon raster GIS files?
bool m_bBeachDepositionSave
Save beach (unconsolidated sediment) deposition raster GIS files?
bool m_bSaveRegular
Save GIS files at regular intervals?
int m_nLayers
The number of sediment layers.
bool m_bSedimentInput
Do we have sediment input events?
bool m_bNormalsSave
Save coastline-normal vector GIS files?
bool m_bAvgWaveHeightSave
Save wave height raster GIS files?
static string strToLower(string const *)
Returns the lower case version of an string, leaving the original unchanged.
string m_strGDALBasementDEMDriverCode
GDAL code for the basement DEM raster file type.
bool m_bHaveSandSediment
Does this simulation consider sand-sized sediment?
int m_nUSave
If user-defined GIS save intervals, the number of these.
bool m_bSeaDepthSave
Save sea depth raster GIS files?
bool m_bWaveAngleAndHeightSave
Save wave angle and wave height raster GIS files?
bool m_bWorldFile
Write a GIS World file?
bool bCheckVectorGISOutputFormat(void)
Checks whether the selected vector OGR driver supports file creation etc.
bool m_bRasterNormalProfileSave
Save rasterized coastline-normal profiles GIS files?
bool m_bActiveZoneSave
Save active zone raster GIS files?
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...
bool m_bDeepWaterWaveHeightSave
Save deep water wave height raster GIS files?
bool m_bMeanWaveEnergySave
Save mean wave energy raster GIS files?
double m_dSimElapsed
Time simulated so far, in hours.
bool m_bCoastCurvatureSave
Save coastline-curvature vector GIS files?
int nConvertMetresToNumCells(double const) const
Given a length in m, this returns the rounded equivalent number of cells.
double dGridYToExtCRSY(double const) const
Given a real-valued Y-axis ordinate in the raster grid CRS (i.e. not the centroid of a cell),...
bool m_bGDALCanWriteInt32
bool m_bBreakingWaveHeightSave
Save breaking wave height raster GIS files?
double m_dRegularSaveTime
bool m_bPolygonNodeSave
Save polygon node vector GIS files?
bool m_bTotalPotentialPlatformErosionSave
Save total potential shore platform erosion raster GIS files?
void SetRasterFileCreationDefaults(void)
Sets per-driver defaults for raster files created using GDAL.
bool m_bSetupSurgeFloodMaskSave
Are we saving the setup surge flood mask? TODO 007.
bool m_bWaveEnergySinceCollapseSave
Save wave energy since cliff collapse raster GIS files?
bool m_bPotentialBeachErosionSave
Save potential beach (unconsolidated sediment) erosion raster GIS files?
bool m_bSuspSedSave
Save suspended sediment raster GIS files?
static double dAngleSubtended(CGeom2DIPoint const *, CGeom2DIPoint const *, CGeom2DIPoint const *)
Returns the signed angle BAC (in radians) subtended between three CGeom2DIPoints B A C....
bool m_bPolygonBoundarySave
Save polygon boundary vector GIS files?
bool m_bStormSurgeSave
Are we saving the storm surge? TODO 007.
double dExtCRSXToGridX(double const) const
Transforms an X-axis ordinate in the external CRS to the equivalent X-axis ordinate in the raster gri...
bool m_bActualPlatformErosionSave
Save actual (supply-limited) shore platform erosion raster GIS files?
bool bSaveAllRasterGISFiles(void)
The bSaveAllRasterGISFiles member function saves the raster GIS files using values from the RasterGri...
bool m_bHaveFineSediment
Does this simulation consider fine-sized sediment?
static string strGetBuild(void)
Returns the date and time on which the program was compiled.
bool m_bTotalPotentialBeachErosionSave
int m_nGISSave
The save number for GIS files (can be sequential, or the iteration number)
static CGeom2DIPoint PtiWeightedAverage(CGeom2DIPoint const *, CGeom2DIPoint const *, double const)
Returns an integer point (grid CRS) which is the weighted average of two other grid CRS integer point...
bool m_bSeaMaskSave
Save sea mask raster GIS files?
bool m_bInterventionClassSave
Save intervention class raster GIS files?
CGeom2DIPoint PtiFindClosestCoastPoint(int const, int const)
Finds the closest point on any coastline to a given point.
bool m_bTotalActualBeachErosionSave
bool m_bRasterCoastlineSave
Save rasterized coastline GIS files?
static CGeom2DPoint PtGetPerpendicular(CGeom2DPoint const *, CGeom2DPoint const *, double const, int const)
Returns a CGeom2DPoint which is the 'other' point of a two-point vector passing through PtStart,...
bool m_bInterventionHeightSave
Save intervention height raster GIS files?
bool m_bRiverineFlooding
Are we doing flooding? TODO 007.
bool m_bSandConsSedSave
Save sand consolidated sediment raster GIS files?
bool m_bSedimentInputEventSave
Save sediment inut data?
static double dTriangleAreax2(CGeom2DPoint const *, CGeom2DPoint const *, CGeom2DPoint const *)
Returns twice the signed area of a triangle.
bool m_bHaveCoarseSediment
Does this simulation consider coarse-sized sediment?
double m_dRegularSaveInterval
The interval between regular saves, in hours.
bool m_bPolygonUnconsSedGainOrLossSave
Save polygon unconsolidated sediment gain or loss raster GIS files?
string m_strGDALRasterOutputDriverLongname
GDAL raster output driver long name.
bool m_bDeepWaterWaveAngleAndHeightSave
Save deep water wave angle and wave height raster GIS files?
double dExtCRSYToGridY(double const) const
Transforms a Y-axis ordinate in the external CRS to the equivalent Y-axis ordinate in the raster grid...
vector< double > m_VdSliceElev
Elevations for raster slice output.
bool m_bBeachProtectionSave
Save beach protection raster GIS files>
bool m_bFineConsSedSave
Save fine consolidated sediment raster GIS files?
bool m_bShadowDowndriftBoundarySave
Save wave shadow downdrift boundary vector GIS files?
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,...
bool m_bDeepWaterWavePeriodSave
Save deep water wave period raster GIS files?
double dGridXToExtCRSX(double const) const
Given a real-valued X-axis ordinate in the raster grid CRS (i.e. not the centroid of a cell),...
bool m_bCoarseConsSedSave
Save coarse consolidated sediment raster GIS files?
CGeom2DPoint PtGridCentroidToExt(CGeom2DIPoint const *) const
Transforms a pointer to a CGeom2DIPoint in the raster grid CRS (assumed to be the centroid of a cell)...
string m_strGDALRasterOutputDriverExtension
GDAL raster output driver file extension.
bool m_bBeachMaskSave
Save beach mask raster GIS files?
bool m_bSlopeSave
Save slope raster grids?
unsigned long m_ulIter
The number of the current iteration (time step)
bool m_bAvgSuspSedSave
Save average suspended sediment raster GIS files?
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...
double m_dCellSide
Length of a cell side (in external CRS units)
bool bIsInterventionCell(int const, int const) const
Returns true if the cell is an intervention.
bool m_bTotCliffCollapseDepositionSave
Save total cliff collapse deposition raster GIS files?
double m_dUSaveTime[SAVEMAX]
bool m_bDoCliffCollapse
Simulate cliff collapse?
bool m_bSetupSurgeRunupFloodMaskSave
Are we saving the setup surge runup flood mask? TODO 007.
bool m_bWaveSetupSave
Are we saving the wave setup? TODO 007.
bool m_bShadowZoneCodesSave
Save wave shadow zones raster GIS files?
bool m_bPotentialPlatformErosionSave
Save potential shore platform erosion raster GIS files?
static CGeom2DIPoint PtiPolygonCentroid(vector< CGeom2DIPoint > *)
Returns an integer point (grid CRS) which is the centroid of a polygon, given by a vector of grid CRS...
GDALDataType m_GDALWriteFloatDataType
bool m_bGDALCanWriteFloat
char ** m_papszGDALRasterOptions
Options for GDAL when handling raster files.
bool m_bCliffNotchSave
Save cliff notch incision depth vector GIS files?
bool m_bVectorWaveFloodLineSave
Are we saving the vector wave flood line? TODO 007.
bool m_bWaveAngleSave
Save wave angle raster GIS files?
bool m_bLocalSlopeSave
Save local slope raster GIS files?
This file contains global definitions for CoastalME.
int const RASTER_PLOT_POLYGON
string const RASTER_PLOT_POLYGON_UPDRIFT_OR_DOWNDRIFT_TITLE
string const RASTER_PLOT_CLIFF_COLLAPSE_EROSION_COARSE_TITLE
string const VECTOR_PLOT_BREAKING_WAVE_HEIGHT_TITLE
string const RASTER_PLOT_CLIFF_TITLE
string const VECTOR_PLOT_INVALID_NORMALS_TITLE
string const VECTOR_PLOT_NORMALS_TITLE
int const VECTOR_PLOT_STORM_SURGE
string const RASTER_PLOT_CLIFF_COLLAPSE_EROSION_SAND_TITLE
string const RASTER_PLOT_COAST_TITLE
string const RASTER_PLOT_POLYGON_TITLE
int const VECTOR_PLOT_BREAKING_WAVE_HEIGHT
int const VECTOR_PLOT_POLYGON_NODES
int const RASTER_PLOT_LOCAL_SLOPE_OF_CONSOLIDATED_SEDIMENT
int const RASTER_PLOT_TOTAL_ACTUAL_BEACH_EROSION
string const RASTER_PLOT_BEACH_DEPOSITION_TITLE
int const RASTER_PLOT_CLIFF_COLLAPSE_DEPOSITION_SAND
int const RASTER_PLOT_BEACH_DEPOSITION
int const RASTER_PLOT_SUSPENDED_SEDIMENT
int const VECTOR_PLOT_NORMALS
string const RASTER_PLOT_DEEP_WATER_WAVE_ORIENTATION_TITLE
string const VECTOR_PLOT_CLIFF_NOTCH_SIZE_TITLE
string const RASTER_PLOT_FINE_CONSOLIDATED_SEDIMENT_TITLE
int const RASTER_PLOT_FINE_UNCONSOLIDATED_SEDIMENT
string const RASTER_PLOT_AVG_SEA_DEPTH_TITLE
string const VECTOR_PLOT_DOWNDRIFT_BOUNDARY_TITLE
string const RASTER_PLOT_BEACH_MASK_TITLE
int const RASTER_PLOT_INUNDATION_MASK
string const RASTER_PLOT_AVG_WAVE_ORIENTATION_TITLE
string const RASTER_PLOT_SETUP_SURGE_FLOOD_MASK_TITLE
int const RASTER_PLOT_SEDIMENT_TOP_ELEVATION_ELEV
string const RASTER_PLOT_ACTUAL_BEACH_EROSION_TITLE
string const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_FINE_TITLE
int const RASTER_PLOT_ACTUAL_BEACH_EROSION
string const RASTER_PLOT_POLYGON_GAIN_OR_LOSS_TITLE
string const VECTOR_PLOT_MEAN_WAVE_ENERGY_TITLE
string const RASTER_PLOT_DEEP_WATER_WAVE_HEIGHT_TITLE
string const RASTER_PLOT_WAVE_ORIENTATION_TITLE
string const RASTER_PLOT_BASEMENT_ELEVATION_TITLE
string const RASTER_PLOT_INTERVENTION_CLASS_TITLE
string const RASTER_PLOT_COARSE_UNCONSOLIDATED_SEDIMENT_TITLE
string const VECTOR_PLOT_POLYGON_NODES_TITLE
string const VECTOR_PLOT_RUN_UP_TITLE
int const RASTER_PLOT_POTENTIAL_PLATFORM_EROSION_MASK
string const RASTER_PLOT_AVG_WAVE_HEIGHT_TITLE
string const RASTER_PLOT_TOTAL_POTENTIAL_PLATFORM_EROSION_TITLE
int const RASTER_PLOT_SAND_CONSOLIDATED_SEDIMENT
int const RASTER_PLOT_AVG_WAVE_HEIGHT
string const VECTOR_PLOT_CLIFF_EDGE_TITLE
int const RASTER_PLOT_FINE_CONSOLIDATED_SEDIMENT
int const VECTOR_PLOT_DOWNDRIFT_BOUNDARY
int const RASTER_PLOT_ACTIVE_ZONE
int const VECTOR_PLOT_COAST_CURVATURE
string const RASTER_PLOT_CLIFF_COLLAPSE_DEPOSITION_COARSE_TITLE
string const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_SAND_TITLE
string const VECTOR_PLOT_WAVE_SETUP_TITLE
string const RASTER_PLOT_LANDFORM_TITLE
int const RASTER_PLOT_DEEP_WATER_WAVE_PERIOD
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_DEPOSITION_SAND
string const RASTER_PLOT_WAVE_HEIGHT_TITLE
int const RASTER_PLOT_COAST
string const VECTOR_PLOT_AVG_WAVE_ANGLE_AND_HEIGHT_TITLE
string const RASTER_PLOT_TOTAL_POTENTIAL_BEACH_EROSION_TITLE
string const VECTOR_PLOT_COAST_CURVATURE_TITLE
string const RASTER_PLOT_POTENTIAL_BEACH_EROSION_TITLE
bool bFPIsEqual(const T d1, const T d2, const T dEpsilon)
int const VECTOR_PLOT_RUN_UP
int const RASTER_PLOT_POLYGON_UPDRIFT_OR_DOWNDRIFT
int const VECTOR_PLOT_INVALID_NORMALS
string const RASTER_PLOT_SETUP_SURGE_RUNUP_FLOOD_MASK_TITLE
int const RASTER_PLOT_POLYGON_GAIN_OR_LOSS
string const RASTER_PLOT_SAND_CONSOLIDATED_SEDIMENT_TITLE
int const RASTER_PLOT_DEEP_WATER_WAVE_ORIENTATION
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_COARSE
int const RASTER_PLOT_SLOPE
string const RASTER_PLOT_ACTUAL_PLATFORM_EROSION_TITLE
int const RASTER_PLOT_COARSE_UNCONSOLIDATED_SEDIMENT
int const RASTER_PLOT_AVG_WAVE_ORIENTATION
string const RASTER_PLOT_TOTAL_BEACH_DEPOSITION_TITLE
int const RASTER_PLOT_WAVE_ORIENTATION
string const RASTER_PLOT_SLOPE_TITLE
int const RASTER_PLOT_BEACH_MASK
int const RASTER_PLOT_WAVE_FLOOD_LINE
int const RASTER_PLOT_SEDIMENT_INPUT
int const RASTER_PLOT_POTENTIAL_BEACH_EROSION
string const RASTER_PLOT_SEDIMENT_TOP_ELEVATION_ELEV_TITLE
int const RASTER_PLOT_AVG_SUSPENDED_SEDIMENT
int const VECTOR_PLOT_COAST
int const VECTOR_PLOT_FLOOD_LINE
string const RASTER_PLOT_BEACH_PROTECTION_TITLE
int const RASTER_PLOT_TOTAL_POTENTIAL_PLATFORM_EROSION
string const RASTER_PLOT_POTENTIAL_PLATFORM_EROSION_MASK_TITLE
string const VECTOR_PLOT_COAST_TITLE
int const VECTOR_PLOT_CLIFF_NOTCH_SIZE
string const PROGRAM_NAME
int const RASTER_PLOT_INTERVENTION_CLASS
int const RASTER_PLOT_CLIFF
string const VECTOR_PLOT_FLOOD_SWL_SETUP_LINE_TITLE
int const VECTOR_PLOT_WAVE_ENERGY_SINCE_COLLAPSE
int const RASTER_PLOT_BEACH_PROTECTION
int const RASTER_PLOT_AVG_SEA_DEPTH
int const VECTOR_PLOT_WAVE_ANGLE_AND_HEIGHT
int const RASTER_PLOT_OVERALL_TOP_ELEVATION
string const RASTER_PLOT_SHADOW_ZONE_TITLE
int const RASTER_PLOT_TOTAL_BEACH_DEPOSITION
string const VECTOR_PLOT_SHADOW_BOUNDARY_TITLE
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_FINE
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_SAND
int const RASTER_PLOT_CLIFF_COLLAPSE_EROSION_FINE
int const VECTOR_PLOT_CLIFF_EDGE
string const RASTER_PLOT_AVG_SUSPENDED_SEDIMENT_TITLE
int const RASTER_PLOT_ACTUAL_PLATFORM_EROSION
int const VECTOR_PLOT_POLYGON_BOUNDARY
string const RASTER_PLOT_INTERVENTION_HEIGHT_TITLE
int const VECTOR_PLOT_MEAN_WAVE_ENERGY
string const VECTOR_PLOT_POLYGON_BOUNDARY_TITLE
string const RASTER_PLOT_SEA_DEPTH_TITLE
string const RASTER_PLOT_TOTAL_ACTUAL_PLATFORM_EROSION_TITLE
string const RASTER_PLOT_SEDIMENT_INPUT_EVENT_TITLE
int const RASTER_PLOT_INTERVENTION_HEIGHT
int const RASTER_PLOT_TOTAL_POTENTIAL_BEACH_EROSION
int const RASTER_PLOT_SAND_UNCONSOLIDATED_SEDIMENT
string const RASTER_PLOT_FINE_UNCONSOLIDATED_SEDIMENT_TITLE
string const RASTER_PLOT_NORMAL_PROFILE_TITLE
string const RASTER_PLOT_DEEP_WATER_WAVE_PERIOD_TITLE
int const RASTER_PLOT_POTENTIAL_PLATFORM_EROSION
string const RASTER_PLOT_INUNDATION_MASK_TITLE
string const RASTER_PLOT_POTENTIAL_PLATFORM_EROSION_TITLE
int const RASTER_PLOT_NORMAL_PROFILE
int const RASTER_PLOT_CLIFF_COLLAPSE_DEPOSITION_COARSE
int const RASTER_PLOT_WAVE_HEIGHT
int const RASTER_PLOT_SHADOW_ZONE
int const VECTOR_PLOT_AVG_WAVE_ANGLE_AND_HEIGHT
int const RASTER_PLOT_DEEP_WATER_WAVE_HEIGHT
string const RASTER_PLOT_CLIFF_COLLAPSE_DEPOSITION_SAND_TITLE
int const VECTOR_PLOT_DEEP_WATER_WAVE_ANGLE_AND_HEIGHT
string const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_COARSE_TITLE
string const RASTER_PLOT_SHADOW_DOWNDRIFT_ZONE_TITLE
int const RASTER_PLOT_COARSE_CONSOLIDATED_SEDIMENT
string const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_DEPOSITION_SAND_TITLE
int const RASTER_PLOT_TOTAL_ACTUAL_PLATFORM_EROSION
int const VECTOR_PLOT_WAVE_SETUP
int const RASTER_PLOT_SETUP_SURGE_RUNUP_FLOOD_MASK
int const RASTER_PLOT_BASEMENT_ELEVATION
string const VECTOR_PLOT_WAVE_ENERGY_SINCE_COLLAPSE_TITLE
int const RASTER_PLOT_LANDFORM
string const RASTER_PLOT_SUSPENDED_SEDIMENT_TITLE
string const VECTOR_PLOT_STORM_SURGE_TITLE
string const RASTER_PLOT_CLIFF_COLLAPSE_EROSION_FINE_TITLE
int const RASTER_PLOT_CLIFF_COLLAPSE_EROSION_COARSE
string const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_DEPOSITION_COARSE_TITLE
int const RASTER_PLOT_SHADOW_DOWNDRIFT_ZONE
string const RASTER_PLOT_SAND_UNCONSOLIDATED_SEDIMENT_TITLE
int const RASTER_PLOT_SLICE
string const RASTER_PLOT_OVERALL_TOP_ELEVATION_TITLE
string const RASTER_PLOT_ACTIVE_ZONE_TITLE
int const VECTOR_PLOT_SHADOW_BOUNDARY
string const RASTER_PLOT_LOCAL_SLOPE_OF_CONSOLIDATED_SEDIMENT_TITLE
string const VECTOR_PLOT_WAVE_ANGLE_AND_HEIGHT_TITLE
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_DEPOSITION_COARSE
string const RASTER_PLOT_TOTAL_ACTUAL_BEACH_EROSION_TITLE
int const RASTER_PLOT_CLIFF_COLLAPSE_EROSION_SAND
string const RASTER_PLOT_SLICE_TITLE
int const RASTER_PLOT_SEA_DEPTH
string const RASTER_PLOT_COARSE_CONSOLIDATED_SEDIMENT_TITLE
string const VECTOR_PLOT_DEEP_WATER_WAVE_ANGLE_AND_HEIGHT_TITLE
int const RASTER_PLOT_SETUP_SURGE_FLOOD_MASK
Contains CRWCoast definitions.
Contains CGeomRasterGrid definitions.
Contains CSimulation definitions.
int nRound(double const d)
Version of the above that returns an int.