52#include <ogrsf_frmts.h>
145 return hypot(dXDist, dYDist);
153 double dXDist = Pti1->
nGetX() - Pti2->
nGetX();
154 double dYDist = Pti1->
nGetY() - Pti2->
nGetY();
156 return hypot(dXDist, dYDist);
178 if (
m_pRasterGrid->m_Cell[nX][nY].bBasementElevIsMissingValue())
189 int nX = Pti->
nGetX();
190 int nY = Pti->
nGetY();
220 int nDiffX = nX0 - nX1;
221 int nDiffY = nY0 - nY1;
233 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
244 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
249 else if (nDiffY == 0)
259 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
270 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
278 int nXDistanceOutside = 0;
279 int nYDistanceOutside = 0;
282 nXDistanceOutside = -nX1;
287 nYDistanceOutside = -nY1;
291 if (nXDistanceOutside >= nYDistanceOutside)
303 nY1 = nY0 +
nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
318 nY1 = nY0 +
nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
336 nX1 = nX0 +
nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
351 nX1 = nX0 +
nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
365 double dNewAngle = dAngle;
368 while (dNewAngle < 0)
372 while (dNewAngle > 360)
383 double dPt1X = pPt1->
dGetX();
384 double dPt1Y = pPt1->
dGetY();
385 double dPt2X = pPt2->
dGetX();
386 double dPt2Y = pPt2->
dGetY();
387 double dPtAvgX = (dPt1X + dPt2X) / 2;
388 double dPtAvgY = (dPt1Y + dPt2Y) / 2;
413 int nPti1X = pPti1->
nGetX();
414 int nPti1Y = pPti1->
nGetY();
415 int nPti2X = pPti2->
nGetX();
416 int nPti2Y = pPti2->
nGetY();
417 double dOtherWeight = 1.0 - dWeight;
419 int nPtiWeightAvgX =
nRound((dWeight * nPti2X) + (dOtherWeight * nPti1X));
420 int nPtiWeightAvgY =
nRound((dWeight * nPti2Y) + (dOtherWeight * nPti1Y));
430 int nSize =
static_cast<int>(pVIn->size());
437 for (
int n = 0; n < nSize; n++)
439 dAvgX += pVIn->at(n).dGetX();
440 dAvgY += pVIn->at(n).dGetY();
479 int nSize =
static_cast<int>(pVIn->size());
486 double dSignedArea = 0.0;
489 for (
int i = 0; i < nSize - 1; ++i)
491 nX0 = pVIn->at(i).nGetX();
492 nY0 = pVIn->at(i).nGetY();
493 nX1 = pVIn->at(i + 1).nGetX();
494 nY1 = pVIn->at(i + 1).nGetY();
496 dA = (nX0 * nY1) - (nX1 * nY0);
498 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
502 nX0 = pVIn->at(nSize - 1).nGetX();
503 nY0 = pVIn->at(nSize - 1).nGetY();
504 nX1 = pVIn->at(0).nGetX();
505 nY1 = pVIn->at(0).nGetY();
507 dA = (nX0 * nY1) - (nX1 * nY0);
509 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
512 PtiCentroid.
DivXDivY(6.0 * dSignedArea, 6.0 * dSignedArea);
555 double dXLen = PtNext->
dGetX() - PtStart->
dGetX();
556 double dYLen = PtNext->
dGetY() - PtStart->
dGetY();
564 dLength = hypot(dXLen, dYLen);
566 double dScaleFactor = dDesiredLength / dLength;
572 EndPt.
SetX(PtStart->
dGetX() + (dScaleFactor * dYLen));
573 EndPt.
SetY(PtStart->
dGetY() - (dScaleFactor * dXLen));
577 EndPt.
SetX(PtStart->
dGetX() - (dScaleFactor * dYLen));
578 EndPt.
SetY(PtStart->
dGetY() + (dScaleFactor * dXLen));
589 double dXLen = PtiNext->
nGetX() - PtiStart->
nGetX();
590 double dYLen = PtiNext->
nGetY() - PtiStart->
nGetY();
598 dLength = hypot(dXLen, dYLen);
600 double dScaleFactor = dDesiredLength / dLength;
623 double dXLen = nNextX - nStartX;
624 double dYLen = nNextY - nStartY;
632 dLength = hypot(dXLen, dYLen);
634 double dScaleFactor = dDesiredLength / dLength;
640 EndPti.
SetX(nStartX +
nRound(dScaleFactor * dYLen));
641 EndPti.
SetY(nStartY -
nRound(dScaleFactor * dXLen));
645 EndPti.
SetX(nStartX -
nRound(dScaleFactor * dYLen));
646 EndPti.
SetY(nStartY +
nRound(dScaleFactor * dXLen));
662 dDotProduct = dXDistBtoA * dXDistCtoA + dYDistBtoA * dYDistCtoA,
663 dPseudoCrossProduct = dXDistBtoA * dYDistCtoA - dYDistBtoA * dXDistCtoA,
664 dAngle = atan2(dPseudoCrossProduct, dDotProduct);
691 char** papszMetadata = pDriver->GetMetadata();
698 if (! CSLFetchBoolean(papszMetadata, GDAL_DCAP_RASTER, FALSE))
706 string strTmp = CSLFetchNameValue(papszMetadata,
"DMD_LONGNAME");
708 strTmp = CSLFetchNameValue(papszMetadata,
"DMD_EXTENSIONS");
712 long unsigned int nPos = strTmp.find(
SPACE);
713 if (nPos == string::npos)
728 if (! CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE, FALSE))
731 if (! CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATECOPY, FALSE))
733 cerr <<
ERR <<
"Cannot write using raster GDAL driver '" <<
m_strRasterGISOutFormat <<
" since neither Create() or CreateCopy() are supported'. Choose another GDAL raster format." << endl;
742 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Float"))
748 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"UInt32"))
762 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Int32"))
776 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"UInt16"))
790 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Int16"))
804 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Byte"))
819 cerr <<
ERR <<
"Cannot write using raster GDAL driver '" <<
m_strRasterGISOutFormat <<
", not even byte output is supported'. Choose another GIS raster format." << endl;
838 char** papszMetadata = pDriver->GetMetadata();
841 if (! CSLFetchBoolean(papszMetadata, GDAL_DCAP_VECTOR, FALSE))
848 if (! CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE, FALSE))
851 cerr <<
ERR <<
"Cannot write vector GIS files using GDAL driver '" <<
m_strRasterGISOutFormat <<
"'. Choose another format." << endl;
1002 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++)
1043 for (
int i = 0; i < static_cast<int>(
m_VdSliceElev.size()); i++)
1389 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetLayerAtElev(dElev);
1393 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory();
1399 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFSubCategory();
1403 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight();
1457 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetBeachProtectionFactor();
1463 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialPlatformErosion();
1467 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualPlatformErosion();
1471 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialPlatformErosion();
1475 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualPlatformErosion();
1479 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialBeachErosion();
1483 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualBeachErosion();
1487 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialBeachErosion();
1491 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualBeachErosion();
1499 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotBeachDeposition();
1503 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetSuspendedSediment();
1511 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetFineDepth();
1515 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetSandDepth();
1519 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetCoarseDepth();
1523 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetFineDepth();
1527 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetSandDepth();
1531 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetCoarseDepth();
1535 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionFine();
1539 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionSand();
1543 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionCoarse();
1547 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseFine();
1551 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseSand();
1555 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseCoarse();
1559 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseSandTalusDeposition();
1563 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseCoarseTalusDeposition();
1567 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotSandTalusDeposition();
1571 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCoarseTalusDeposition();
1575 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetShadowZoneNumber();
1579 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1583 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1587 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1595 dTmp =
m_pVCoastPolygon[nPoly]->dGetBeachDepositionAndSuspensionAllUncons();
1620 if (strDriver ==
"aaigrid")
1624 else if (strDriver ==
"bmp")
1628 else if (strDriver ==
"gtiff")
1637 else if (strDriver ==
"hfa")
1642 else if (strDriver ==
"jpeg")
1648 else if (strDriver ==
"png")
1660 else if (strDriver ==
"rst")
1665 else if (strDriver ==
"geojson")
1670 else if (strDriver ==
"gpkg")
1676 else if (strDriver ==
"netcdf")
1745 unsigned int nMinSqDist = UINT_MAX;
1749 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1751 for (
int j = 0; j <
m_VCoast[nCoast].nGetCoastlineSize(); j++)
1755 nXCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX(),
1756 nYCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
1760 nXDist = nX - nXCoast,
1761 nYDist = nY - nYCoast;
1763 unsigned int nSqDist = (nXDist * nXDist) + (nYDist * nYDist);
1766 if (nSqDist < nMinSqDist)
1768 nMinSqDist = nSqDist;
1769 PtiCoastPoint.
SetXY(nXCoast, nYCoast);
1774 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.
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 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?
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)
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
Missing value.
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?
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_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?
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
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?
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?
void KeepWithinValidGrid(int, int, int &, int &) const
Given two points in the grid CRS (the points assumed not to be coincident), this routine modifies the...
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
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)
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.
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
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?
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?
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
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 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
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
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
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
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
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.