54#include <cpl_string.h>
145 double const dXDist = Pt1->
dGetX() - Pt2->
dGetX();
146 double const dYDist = Pt1->
dGetY() - Pt2->
dGetY();
148 return hypot(dXDist, dYDist);
156 double const dXDist = Pti1->
nGetX() - Pti2->
nGetX();
157 double const dYDist = Pti1->
nGetY() - Pti2->
nGetY();
159 return hypot(dXDist, dYDist);
167 double const dXDist = dX1 - dX2;
168 double const dYDist = dY1 - dY2;
170 return hypot(dXDist, dYDist);
192 if (
m_pRasterGrid->m_Cell[nX][nY].bBasementElevIsMissingValue())
203 int const nX = Pti->
nGetX();
204 int const nY = Pti->
nGetY();
249 int const nDiffX = nX0 - nX1;
250 int const nDiffY = nY0 - nY1;
262 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
273 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
278 else if (nDiffY == 0)
288 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
299 }
while (
m_pRasterGrid->m_Cell[nX1][nY1].bBasementElevIsMissingValue());
307 int nXDistanceOutside = 0;
308 int nYDistanceOutside = 0;
311 nXDistanceOutside = -nX1;
316 nYDistanceOutside = -nY1;
320 if (nXDistanceOutside >= nYDistanceOutside)
332 nY1 = nY0 +
nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
346 nY1 = nY0 +
nRound(((nX1 - nX0) * nDiffY) /
static_cast<double>(nDiffX));
364 nX1 = nX0 +
nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
379 nRound(((nY1 - nY0) * nDiffX) /
static_cast<double>(nDiffY));
393 double dNewAngle = dAngle;
396 while (dNewAngle < 0)
400 while (dNewAngle > 360)
411 double const dPt1X = pPt1->
dGetX();
412 double const dPt1Y = pPt1->
dGetY();
413 double const dPt2X = pPt2->
dGetX();
414 double const dPt2Y = pPt2->
dGetY();
415 double const dPtAvgX = (dPt1X + dPt2X) / 2;
416 double const dPtAvgY = (dPt1Y + dPt2Y) / 2;
441 int const nPti1X = pPti1->
nGetX();
442 int const nPti1Y = pPti1->
nGetY();
443 int const nPti2X = pPti2->
nGetX();
444 int const nPti2Y = pPti2->
nGetY();
445 double const dOtherWeight = 1.0 - dWeight;
447 int const nPtiWeightAvgX =
nRound((dWeight * nPti2X) + (dOtherWeight * nPti1X));
448 int const nPtiWeightAvgY =
nRound((dWeight * nPti2Y) + (dOtherWeight * nPti1Y));
458 int const nSize =
static_cast<int>(pVIn->size());
466 for (
int n = 0; n < nSize; n++)
468 dAvgX += pVIn->at(n).dGetX();
469 dAvgY += pVIn->at(n).dGetY();
508 int const nSize =
static_cast<int>(pVIn->size());
515 double dSignedArea = 0.0;
518 for (
int i = 0; i < nSize - 1; ++i)
520 nX0 = pVIn->at(i).nGetX();
521 nY0 = pVIn->at(i).nGetY();
522 nX1 = pVIn->at(i + 1).nGetX();
523 nY1 = pVIn->at(i + 1).nGetY();
525 dA = (nX0 * nY1) - (nX1 * nY0);
527 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
531 nX0 = pVIn->at(nSize - 1).nGetX();
532 nY0 = pVIn->at(nSize - 1).nGetY();
533 nX1 = pVIn->at(0).nGetX();
534 nY1 = pVIn->at(0).nGetY();
536 dA = (nX0 * nY1) - (nX1 * nY0);
538 PtiCentroid.
AddXAddY((nX0 + nX1) * dA, (nY0 + nY1) * dA);
541 PtiCentroid.
DivXDivY(6.0 * dSignedArea, 6.0 * dSignedArea);
621 double const dXLen = PtiNext->
nGetX() - PtiStart->
nGetX();
622 double const dYLen = PtiNext->
nGetY() - PtiStart->
nGetY();
632 dLength = hypot(dXLen, dYLen);
634 double const dScaleFactor = dDesiredLength / dLength;
659 double const dXLen = nNextX - nStartX;
660 double const dYLen = nNextY - nStartY;
670 dLength = hypot(dXLen, dYLen);
672 double const dScaleFactor = dDesiredLength / dLength;
679 EndPti.
SetX(nStartX +
nRound(dScaleFactor * dYLen));
680 EndPti.
SetY(nStartY -
nRound(dScaleFactor * dXLen));
685 EndPti.
SetX(nStartX -
nRound(dScaleFactor * dYLen));
686 EndPti.
SetY(nStartY +
nRound(dScaleFactor * dXLen));
697 double const dXDistBtoA = pPtiB->
nGetX() - pPtiA->
nGetX();
698 double const dYDistBtoA = pPtiB->
nGetY() - pPtiA->
nGetY();
699 double const dXDistCtoA = pPtiC->
nGetX() - pPtiA->
nGetX();
700 double const dYDistCtoA = pPtiC->
nGetY() - pPtiA->
nGetY();
701 double const dDotProduct = dXDistBtoA * dXDistCtoA + dYDistBtoA * dYDistCtoA;
702 double const dPseudoCrossProduct = dXDistBtoA * dYDistCtoA - dYDistBtoA * dXDistCtoA;
703 double const dAngle = atan2(dPseudoCrossProduct, dDotProduct);
731 char **papszMetadata = pDriver->GetMetadata();
738 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_RASTER,
false))
746 string strTmp = CSLFetchNameValue(papszMetadata,
"DMD_LONGNAME");
748 strTmp = CSLFetchNameValue(papszMetadata,
"DMD_EXTENSIONS");
752 long unsigned int const nPos = strTmp.find(
SPACE);
754 if (nPos == string::npos)
770 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE,
false))
773 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATECOPY,
false))
775 cerr <<
ERR <<
"Cannot write using raster GDAL driver '" <<
m_strRasterGISOutFormat <<
" since neither Create() or CreateCopy() are supported'. Choose another GDAL raster format." << endl;
784 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Float"))
790 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"UInt32"))
804 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Int32"))
818 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"UInt16"))
832 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Int16"))
846 if (strstr(CSLFetchNameValue(papszMetadata,
"DMD_CREATIONDATATYPES"),
"Byte"))
861 cerr <<
ERR <<
"Cannot write using raster GDAL driver '" <<
m_strRasterGISOutFormat <<
", not even byte output is supported'. Choose another GIS raster format." << endl;
881 char **papszMetadata = pDriver->GetMetadata();
884 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_VECTOR,
false))
891 if (!CSLFetchBoolean(papszMetadata, GDAL_DCAP_CREATE,
false))
894 cerr <<
ERR <<
"Cannot write vector GIS files using GDAL driver '" <<
m_strRasterGISOutFormat <<
"'. Choose another format." << endl;
943 double dLastInterval;
1080 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++)
1121 for (
int i = 0; i < static_cast<int>(
m_VdSliceElev.size()); i++)
1178 if (!
bWriteRasterGISFile(RASTER_PLOT_CLIFF_COLLAPSE_TIMESTEP, &RASTER_PLOT_CLIFF_COLLAPSE_TIMESTEP_TITLE))
1503 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetLayerAtElev(dElev);
1507 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory();
1514 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory();
1519 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight();
1531 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetAllSedTopElevIncTalus();
1580 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetBeachProtectionFactor();
1588 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialPlatformErosion();
1592 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualPlatformErosion();
1596 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialPlatformErosion();
1600 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualPlatformErosion();
1604 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialBeachErosion();
1608 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetActualBeachErosion();
1612 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotPotentialBeachErosion();
1616 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotActualBeachErosion();
1624 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotBeachDeposition();
1628 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetSuspendedSediment();
1632 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotSuspendedSediment() /
1637 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetFineDepth();
1641 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetSandDepth();
1645 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetUnconsolidatedSediment()->dGetCoarseDepth();
1649 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetFineDepth();
1653 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetSandDepth();
1657 dTmp =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nLayer)->pGetConsolidatedSediment()->dGetCoarseDepth();
1661 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionFine();
1665 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionSand();
1669 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseErosionCoarse();
1673 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseFine();
1677 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseSand();
1681 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCliffCollapseCoarse();
1685 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseSandTalusDeposition();
1689 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetThisIterCliffCollapseCoarseTalusDeposition();
1693 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotSandTalusDeposition();
1697 dTmp =
m_pRasterGrid->m_Cell[nX][nY].dGetTotCoarseTalusDeposition();
1701 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetShadowZoneNumber();
1705 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1709 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1713 dTmp =
m_pRasterGrid->m_Cell[nX][nY].nGetDownDriftZoneNumber();
1717 int const nPoly =
m_pRasterGrid->m_Cell[nX][nY].nGetPolygonID();
1718 int const nPolyCoast =
m_pRasterGrid->m_Cell[nX][nY].nGetPolygonCoastID();
1723 dTmp =
m_VCoast[nPolyCoast].pGetPolygon(nPoly)->dGetBeachDepositionAndSuspensionAllUncons();
1749 if (strDriver ==
"aaigrid")
1752 else if (strDriver ==
"bmp")
1755 else if (strDriver ==
"gtiff")
1763 else if (strDriver ==
"hfa")
1767 else if (strDriver ==
"jpeg")
1772 else if (strDriver ==
"png")
1782 else if (strDriver ==
"rst")
1786 else if (strDriver ==
"geojson")
1790 else if (strDriver ==
"gpkg")
1796 else if (strDriver ==
"netcdf")
1863 unsigned int nMinSqDist = UINT_MAX;
1867 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1869 for (
int j = 0; j <
m_VCoast[nCoast].nGetCoastlineSize(); j++)
1872 int const nXCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX();
1873 int const nYCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
1876 int const nXDist = nX - nXCoast;
1877 int const nYDist = nY - nYCoast;
1879 unsigned int const nSqDist = (nXDist * nXDist) + (nYDist * nYDist);
1882 if (nSqDist < nMinSqDist)
1884 nMinSqDist = nSqDist;
1885 PtiCoastPoint.
SetXY(nXCoast, nYCoast);
1886 nCoastFound = nCoast;
1891 return PtiCoastPoint;
1899 unsigned int nMinSqDist = UINT_MAX;
1903 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1905 for (
int j = 0; j <
m_VCoast[nCoast].nGetCoastlineSize(); j++)
1908 int const nXCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX();
1909 int const nYCoast =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
1912 int const nXDist = nX - nXCoast;
1913 int const nYDist = nY - nYCoast;
1915 unsigned int const nSqDist = (nXDist * nXDist) + (nYDist * nYDist);
1918 if (nSqDist < nMinSqDist)
1920 nMinSqDist = nSqDist;
1922 nCoastFound = nCoast;
1943 double const dAPx = dPx - dAx;
1944 double const dAPy = dPy - dAy;
1945 double const dABx = dBx - dAx;
1946 double const dABy = dBy - dAy;
1947 double const dMagAB2 = (dABx * dABx) + (dABy * dABy);
1948 double const dABdotAP = (dABx * dAPx) + (dABy * dAPy);
1949 double const dT = dABdotAP / dMagAB2;
1963 dXRet = dAx + (dABx * dT);
1964 dYRet = dAy + (dABy * dT);
1973 int const nX1 = pPt1->
nGetX();
1974 int const nY1 = pPt1->
nGetY();
1975 int const nX2 = pPt2->
nGetX();
1976 int const nY2 = pPt2->
nGetY();
1980 if ((nY1 == nY2 + 1) || (nY1 == nY2 - 1))
1986 if ((nX1 == nX2 + 1) || (nX1 == nX2 - 1))
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.
double dGetY(void) const
Returns the CGeom2DPoint object's double Y coordinate.
double dGetX(void) const
Returns the CGeom2DPoint object's double 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_bSlopeConsSedSave
Save slope of consolidated sediment raster GIS files?
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_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.
bool m_bCoastSave
Save coastline as vector GIS file?
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...
bool m_bTopSurfIncSeaSave
Save top surface (sediment, talus, and sea) raster DEMs?
bool m_bSedIncTalusTopSurfSave
Save sediment (inc talus) top surface raster DEMs?
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 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?
void FindClosestPointOnStraightLine(double const, double const, double const, double const, double const, double const, double &, double &)
For the straight line between two points A and B, and given another point C, this finds the closest p...
int m_nYGridSize
The size of the grid in the y direction.
bool m_bWaveTransectPointsSave
Save wave transect points vector GIS files?
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
Vector GIS output format.
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
Raster GIS output format.
bool m_bTotalBeachDepositionSave
Save total beach (unconsolidated sediment) deposition raster GIS files?
bool m_bSandUnconsSedSave
Save sand unconsolidated sediment raster GIS files?
bool bIsAdjacentEdgeCell(CGeom2DIPoint const *, CGeom2DIPoint const *)
Given two different edge cells, returns true if they are adjacent.
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 GDAL/OGR driver supports file creation etc.
bool m_bSlopeSaveForCliffToe
Save slope raster grids (used for cliff toe location)?
bool m_bCliffCollapseTimestepSave
Are we saving the timestep at which each cliff occurred?
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_bCliffToeSave
Save cliff toe raster grids?
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
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_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?
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
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?
bool m_bTotalActualBeachErosionSave
Save total actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
bool m_bRasterCoastlineSave
Save rasterized coastline GIS files?
bool m_bInterventionHeightSave
Save intervention height raster GIS files?
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, defined by three points.
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?
int nFindClosestCoastPoint(int const, int const, int &)
Finds the number of the closest point on any coastline to a given point, or INT_NODATA in case of err...
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...
bool m_bTalusSave
Save talus depth?
bool m_bCliffNotchAllSave
Are we saving all cliff notches?
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?
CGeom2DIPoint PtiFindClosestCoastPoint(int const, int const, int &)
Finds the closest point on any coastline to a given point.
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_bWaveAngleSave
Save wave angle 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
int const RASTER_PLOT_CONS_SED_SLOPE
string const VECTOR_PLOT_INVALID_NORMALS_TITLE
string const VECTOR_PLOT_NORMALS_TITLE
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_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 RASTER_PLOT_FINE_CONSOLIDATED_SEDIMENT_TITLE
int const RASTER_PLOT_FINE_UNCONSOLIDATED_SEDIMENT
string const RASTER_PLOT_AVG_SEA_DEPTH_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_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 VECTOR_PLOT_SHADOW_ZONE_BOUNDARY_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 RASTER_PLOT_SLOPE_FOR_CLIFF_TOE_TITLE
string const VECTOR_PLOT_POLYGON_NODES_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
string const RASTER_PLOT_SED_TOP_INC_TALUS_ELEV_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 RASTER_PLOT_TOP_ELEV_INC_SEA
int const VECTOR_PLOT_COAST_SWL_HIGHEST
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 RASTER_PLOT_LANDFORM_TITLE
int const RASTER_PLOT_DEEP_WATER_WAVE_PERIOD
int const RASTER_PLOT_TALUS
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 RASTER_PLOT_POLYGON_UPDRIFT_OR_DOWNDRIFT
int const VECTOR_PLOT_SHADOW_ZONE_BOUNDARY
int const VECTOR_PLOT_INVALID_NORMALS
string const RASTER_PLOT_CLIFF_NOTCH_ALL_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
int const VECTOR_PLOT_DOWNDRIFT_ZONE_BOUNDARY
int const RASTER_PLOT_AVG_SUSPENDED_SEDIMENT
int const VECTOR_PLOT_COAST
string const RASTER_PLOT_BEACH_PROTECTION_TITLE
int const RASTER_PLOT_TOTAL_POTENTIAL_PLATFORM_EROSION
int const RASTER_PLOT_SLOPE_FOR_CLIFF_TOE
string const RASTER_PLOT_POTENTIAL_PLATFORM_EROSION_MASK_TITLE
int const VECTOR_PLOT_COAST_SWL_LOWEST
string const VECTOR_PLOT_COAST_TITLE
string const PROGRAM_NAME
int const RASTER_PLOT_INTERVENTION_CLASS
string const VECTOR_PLOT_WAVE_TRANSECT_POINTS_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 VECTOR_PLOT_CLIFF_NOTCH_ACTIVE
string const RASTER_PLOT_SHADOW_ZONE_TITLE
int const RASTER_PLOT_TOTAL_BEACH_DEPOSITION
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_FINE
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_EROSION_SAND
int const RASTER_PLOT_CLIFF_TOE
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
int const RASTER_PLOT_SED_TOP_INC_TALUS_ELEV
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_TOP_ELEV_INC_SEA_TITLE
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
string const RASTER_PLOT_TALUS_TITLE
int const RASTER_PLOT_NORMAL_PROFILE
int const RASTER_PLOT_CLIFF_NOTCH_ALL
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
string const RASTER_PLOT_CLIFF_TOE_TITLE
string const VECTOR_PLOT_DOWNDRIFT_ZONE_BOUNDARY_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 RASTER_PLOT_SETUP_SURGE_RUNUP_FLOOD_MASK
int const RASTER_PLOT_BASEMENT_ELEVATION
string const VECTOR_PLOT_WAVE_ENERGY_SINCE_COLLAPSE_TITLE
int const VECTOR_PLOT_WAVE_TRANSECT_POINTS
string const VECTOR_PLOT_CLIFF_NOTCH_ACTIVE_TITLE
int const RASTER_PLOT_LANDFORM
string const RASTER_PLOT_SUSPENDED_SEDIMENT_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
string const VECTOR_PLOT_COAST_SWL_LOWEST_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_ACTIVE_ZONE_TITLE
string const VECTOR_PLOT_WAVE_ANGLE_AND_HEIGHT_TITLE
string const RASTER_PLOT_CONS_SED_SLOPE_TITLE
int const RASTER_PLOT_TOTAL_CLIFF_COLLAPSE_DEPOSITION_COARSE
string const RASTER_PLOT_TOTAL_ACTUAL_BEACH_EROSION_TITLE
string const VECTOR_PLOT_COAST_SWL_HIGHEST_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)
Correctly rounds doubles, returns an int.