56#include <cpl_string.h>
153 double const dXDist = Pt1->
dGetX() - Pt2->
dGetX();
154 double const dYDist = Pt1->
dGetY() - Pt2->
dGetY();
156 return hypot(dXDist, dYDist);
165 double const dXDist = Pti1->
nGetX() - Pti2->
nGetX();
166 double const dYDist = Pti1->
nGetY() - Pti2->
nGetY();
168 return hypot(dXDist, dYDist);
194 if (
m_pRasterGrid->m_Cell[nX][nY].bBasementElevIsMissingValue())
207 int const nX = Pti->
nGetX();
208 int const nY = Pti->
nGetY();
263 int const nDiffX = nX0 - nX1;
264 int const nDiffY = nY0 - nY1;
277 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
289 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
295 else if (nDiffY == 0)
306 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
318 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
332 int nXDistanceOutside = 0;
333 int nYDistanceOutside = 0;
336 nXDistanceOutside = -nX1;
342 nYDistanceOutside = -nY1;
347 if (nXDistanceOutside >= nYDistanceOutside)
361 nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
364 (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue()));
380 nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
383 (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue()));
403 nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
406 (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue()));
422 nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
425 (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue()));
438 double dNewAngle = dAngle;
441 while (dNewAngle < 0)
445 while (dNewAngle > 360)
456 double const dPt1X = pPt1->
dGetX();
457 double const dPt1Y = pPt1->
dGetY();
458 double const dPt2X = pPt2->
dGetX();
459 double const dPt2Y = pPt2->
dGetY();
460 double const dPtAvgX = (dPt1X + dPt2X) / 2;
461 double const dPtAvgY = (dPt1Y + dPt2Y) / 2;
471 int nPti1X = pPti1->
nGetX();
472 int nPti1Y = pPti1->
nGetY();
473 int nPti2X = pPti2->
nGetX();
474 int nPti2Y = pPti2->
nGetY();
475 int nPtiAvgX = (nPti1X + nPti2X) / 2;
476 int nPtiAvgY = (nPti1Y + nPti2Y) / 2;
486 int const nPti1X = pPti1->
nGetX();
487 int const nPti1Y = pPti1->
nGetY();
488 int const nPti2X = pPti2->
nGetX();
489 int const nPti2Y = pPti2->
nGetY();
490 double const dOtherWeight = 1.0 - dWeight;
492 int const nPtiWeightAvgX =
nRound((dWeight * nPti2X) + (dOtherWeight * nPti1X));
493 int const nPtiWeightAvgY =
nRound((dWeight * nPti2Y) + (dOtherWeight * nPti1Y));
503 int const nSize =
static_cast<int>(pVIn->size());
511 for (
int n = 0; n < nSize; n++)
513 dAvgX += pVIn->at(n).dGetX();
514 dAvgY += pVIn->at(n).dGetY();
556 int const nSize =
static_cast<int>(pVIn->size());
563 double dSignedArea = 0.0;
566 for (
int i = 0; i < nSize - 1; ++i)
568 nX0 = pVIn->at(i).nGetX();
569 nY0 = pVIn->at(i).nGetY();
570 nX1 = pVIn->at(i + 1).nGetX();
571 nY1 = pVIn->at(i + 1).nGetY();
573 dA = (nX0 * nY1) - (nX1 * nY0);
575 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
580 nX0 = pVIn->at(nSize - 1).nGetX();
581 nY0 = pVIn->at(nSize - 1).nGetY();
582 nX1 = pVIn->at(0).nGetX();
583 nY1 = pVIn->at(0).nGetY();
585 dA = (nX0 * nY1) - (nX1 * nY0);
587 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
590 PtiCentroid.
DivXDivY(6.0 * dSignedArea, 6.0 * dSignedArea);
639 double const dDesiredLength,
640 int const nHandedness)
642 double const dXLen = PtNext->
dGetX() - PtStart->
dGetX();
643 double const dYLen = PtNext->
dGetY() - PtStart->
dGetY();
653 dLength = hypot(dXLen, dYLen);
655 double const dScaleFactor = dDesiredLength / dLength;
663 EndPt.
SetX(PtStart->
dGetX() + (dScaleFactor * dYLen));
664 EndPt.
SetY(PtStart->
dGetY() - (dScaleFactor * dXLen));
669 EndPt.
SetX(PtStart->
dGetX() - (dScaleFactor * dYLen));
670 EndPt.
SetY(PtStart->
dGetY() + (dScaleFactor * dXLen));
683 double const dDesiredLength,
684 int const nHandedness)
686 double const dXLen = PtiNext->
nGetX() - PtiStart->
nGetX();
687 double const dYLen = PtiNext->
nGetY() - PtiStart->
nGetY();
697 dLength = hypot(dXLen, dYLen);
699 double const dScaleFactor = dDesiredLength / dLength;
726 int const nStartX,
int const nStartY,
int const nNextX,
int const nNextY,
727 double const dDesiredLength,
int const nHandedness)
729 double const dXLen = nNextX - nStartX;
730 double const dYLen = nNextY - nStartY;
740 dLength = hypot(dXLen, dYLen);
742 double const dScaleFactor = dDesiredLength / dLength;
750 EndPti.
SetX(nStartX +
nRound(dScaleFactor * dYLen));
751 EndPti.
SetY(nStartY -
nRound(dScaleFactor * dXLen));
756 EndPti.
SetX(nStartX -
nRound(dScaleFactor * dYLen));
757 EndPti.
SetY(nStartY +
nRound(dScaleFactor * dXLen));
772 double const dXDistBtoA = pPtiB->
nGetX() - pPtiA->
nGetX();
773 double const dYDistBtoA = pPtiB->
nGetY() - pPtiA->
nGetY();
774 double const dXDistCtoA = pPtiC->
nGetX() - pPtiA->
nGetX();
775 double const dYDistCtoA = pPtiC->
nGetY() - pPtiA->
nGetY();
776 double const dDotProduct = dXDistBtoA * dXDistCtoA + dYDistBtoA * dYDistCtoA;
777 double const dPseudoCrossProduct = dXDistBtoA * dYDistCtoA - dYDistBtoA * dXDistCtoA;
778 double const dAngle = atan2(dPseudoCrossProduct, dDotProduct);
798 GDALDriver *pDriver =
804 cerr <<
ERR <<
"Unknown raster GIS output format '"
810 char **papszMetadata = pDriver->GetMetadata();
817 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_RASTER,
false))
821 <<
"' is not a raster driver. Choose another format." << endl;
826 string strTmp = CSLFetchNameValue(papszMetadata,
"DMD_LONGNAME");
828 strTmp = CSLFetchNameValue(
835 long unsigned int const nPos = strTmp.find(
SPACE);
837 if (nPos == string::npos)
853 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE,
false))
856 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATECOPY,
false))
858 cerr <<
ERR <<
"Cannot write using raster GDAL driver '"
860 <<
" since neither Create() or CreateCopy() are supported'. Choose "
861 "another GDAL raster format."
872 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
879 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
894 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
909 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
924 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
939 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
955 cerr <<
ERR <<
"Cannot write using raster GDAL driver '"
957 <<
", not even byte output is supported'. Choose another GIS raster "
970 GDALDriver *pDriver =
976 cerr <<
ERR <<
"Unknown vector GIS output format '"
982 char **papszMetadata = pDriver->GetMetadata();
985 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_VECTOR,
false))
989 <<
"' is not a vector driver. Choose another format." << endl;
993 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE,
false))
996 cerr <<
ERR <<
"Cannot write vector GIS files using GDAL driver '"
1052 double dLastInterval;
1186 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++)
1227 for (
int i = 0; i < static_cast<int>(
m_VdSliceElev.size()); i++)
1553 double &dMax,
int const nLayer,
1587 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetLayerAtElev(dElev);
1591 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory();
1599 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFSubCategory();
1604 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight();
1665 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetBeachProtectionFactor();
1673 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialPlatformErosion();
1677 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualPlatformErosion();
1681 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialPlatformErosion();
1685 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualPlatformErosion();
1689 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialBeachErosion();
1693 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualBeachErosion();
1697 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialBeachErosion();
1701 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualBeachErosion();
1709 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotBeachDeposition();
1713 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetSuspendedSediment();
1717 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotSuspendedSediment() /
1723 .pGetLayerAboveBasement(nLayer)
1724 ->pGetUnconsolidatedSediment()
1730 .pGetLayerAboveBasement(nLayer)
1731 ->pGetUnconsolidatedSediment()
1737 .pGetLayerAboveBasement(nLayer)
1738 ->pGetUnconsolidatedSediment()
1739 ->dGetCoarseDepth();
1744 .pGetLayerAboveBasement(nLayer)
1745 ->pGetConsolidatedSediment()
1751 .pGetLayerAboveBasement(nLayer)
1752 ->pGetConsolidatedSediment()
1758 .pGetLayerAboveBasement(nLayer)
1759 ->pGetConsolidatedSediment()
1760 ->dGetCoarseDepth();
1765 .dGetThisIterCliffCollapseErosionFine();
1770 .dGetThisIterCliffCollapseErosionSand();
1775 .dGetThisIterCliffCollapseErosionCoarse();
1779 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseFine();
1783 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseSand();
1787 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseCoarse();
1792 .dGetThisIterCliffCollapseSandTalusDeposition();
1797 .dGetThisIterCliffCollapseCoarseTalusDeposition();
1801 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotSandTalusDeposition();
1805 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCoarseTalusDeposition();
1809 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetShadowZoneNumber();
1813 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1817 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1821 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1825 int const nPoly =
m_pRasterGrid->m_Cell[nX][nY].nGetPolygonID();
1832 ->dGetBeachDepositionAndSuspensionAllUncons();
1858 if (strDriver ==
"aaigrid")
1862 else if (strDriver ==
"bmp")
1866 else if (strDriver ==
"gtiff")
1878 else if (strDriver ==
"hfa")
1884 else if (strDriver ==
"jpeg")
1887 "COMMENT", strComment.c_str());
1892 else if (strDriver ==
"png")
1905 "COMMENT", strComment.c_str());
1910 else if (strDriver ==
"rst")
1913 "COMMENT", strComment.c_str());
1916 else if (strDriver ==
"geojson")
1922 else if (strDriver ==
"gpkg")
1931 else if (strDriver ==
"netcdf")
2003 unsigned int nMinSqDist = UINT_MAX;
2007 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
2009 for (
int j = 0; j <
m_VCoast[nCoast].nGetCoastlineSize(); j++)
2012 int const nXCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX();
2013 int const nYCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
2016 int const nXDist = nX - nXCoast;
2017 int const nYDist = nY - nYCoast;
2019 unsigned int const nSqDist = (nXDist * nXDist) + (nYDist * nYDist);
2022 if (nSqDist < nMinSqDist)
2024 nMinSqDist = nSqDist;
2025 PtiCoastPoint.
SetXY(nXCoast, nYCoast);
2030 return PtiCoastPoint;
Contains CGeom2DPoint definitions.
Contains CGeom2DIPoint definitions.
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)
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)
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)
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.
long m_lGDALMaxCanWrite
The maximum integer value which GDAL can write, can be UINT8_MAX, INT16_MAX, UINT16_MAX,...
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 GDAL/OGR.
bool m_bInvalidNormalsSave
Save invalid coastline-normal vector GIS files?
bool m_bShadowBoundarySave
Save wave shadow boundary vector GIS files?
bool m_bActualBeachErosionSave
Save actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
int m_nYGridSize
The size of the grid in the y direction.
bool m_bRunUpSave
Are we saving runup? TODO 007.
GDALDataType m_GDALWriteIntDataType
The data type used by GDAL for integer operations, can be GDT_Byte, GDT_Int16, GDT_UInt16,...
bool m_bCliffCollapseDepositionSave
Save cliff collapse deposition raster GIS files?
bool m_bTotalActualPlatformErosionSave
Save total actual (supply-limited) shore platform erosion raster GIS files?
bool m_bPolygonUnconsSedUpOrDownDriftSave
Save polygon unconsolidated sediment up- or down-drift raster GIS files?
double m_dGeoTransform[6]
GDAL geotransformation info (see http://www.gdal.org/classGDALDataset.html)
static CGeom2DIPoint PtiGetPerpendicular(CGeom2DIPoint const *, CGeom2DIPoint const *, double const, int const)
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
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 GDAL/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
bool m_bGDALCanWriteInt32
Is the selected GDAL output file format capable of writing 32-bit integers to files?
bool m_bBreakingWaveHeightSave
Save breaking wave height raster GIS files?
double m_dRegularSaveTime
The time of the next save, in hours from the start of the simulation, if we are saving regularly.
bool m_bPolygonNodeSave
Save polygon node vector GIS files?
static CGeom2DIPoint PtiAverage(CGeom2DIPoint const *, CGeom2DIPoint const *)
Returns an integer point (grid CRS) which is the approximate average of (i.e. is midway between) two ...
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 *)
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
bool m_bActualPlatformErosionSave
Save actual (supply-limited) shore platform erosion raster GIS files?
bool bSaveAllRasterGISFiles(void)
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
Save total potential beach (unconsolidated sediment) erosion raster GIS files?
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
Save total actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
bool m_bRasterCoastlineSave
Save rasterized coastline GIS files?
static CGeom2DPoint PtGetPerpendicular(CGeom2DPoint const *, CGeom2DPoint const *, double const, int const)
bool m_bInterventionHeightSave
Save intervention height raster GIS files?
bool m_bRiverineFlooding
Are we doing flooding? TODO 007.
long m_lGDALMinCanWrite
The minimum integer value which GDAL can write, can be zero, INT16_MIN, INT32_MIN.
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
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
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]
Save time, in hours from the start of the simukation, if we are not saving regularly.
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 > *)
GDALDataType m_GDALWriteFloatDataType
Thw data type used by GDAL for floating point operations, can be GDT_Byte, GDT_Int16,...
bool m_bGDALCanWriteFloat
Is the selected GDAL output file format capable of writing floating-point values to files?
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?
vector< CGeomCoastPolygon * > m_pVCoastPolygon
Pointers to coast polygon objects, in down-coast sequence TODO 044 Will need to use global polygon ID...
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.
int nRound(double const d)
Version of the above that returns an int.