CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
profile.h
Go to the documentation of this file.
1
14
15#ifndef PROFILE_H
16#define PROFILE_H
17/*===============================================================================================================================
18
19This file is part of CoastalME, the Coastal Modelling Environment.
20
21CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
22
23This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
24
25You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27===============================================================================================================================*/
28#include "cme.h"
29#include "2d_point.h"
30#include "2di_point.h"
31#include "multi_line.h"
32#include "raster_grid.h"
33
35{
36private:
39
42
45
48
51
54
57
60
63
66
69
72
75
78
81
84
87
90
93
96
98 vector<CGeom2DIPoint> m_VCellInProfile;
99
100 // The following have the same length as m_VCellInProfile
102 vector<CGeom2DPoint> m_VCellInProfileExtCRS;
103
104 // Is this profile point part of a multi-line?
105// vector<bool> m_bVShared;
106
107protected:
108
109public:
110 explicit CGeomProfile(int const, int const, int const, int const, CGeom2DIPoint const*, CGeom2DIPoint const*, bool const);
111 ~CGeomProfile(void) override;
112
113 int nGetCoastID(void) const;
114 int nGetGlobalID(void) const;
115 int nGetCoastPoint(void) const;
116
118 void SetEndPoint(CGeom2DIPoint const*);
120
121 void SetStartOfCoast(bool const);
122 bool bStartOfCoast(void) const;
123 void SetEndOfCoast(bool const);
124 bool bEndOfCoast(void) const;
125
126 void SetCShoreProblem(bool const);
127 bool bCShoreProblem(void) const;
128
129 void SetHitLand(bool const);
130 bool bHitLand(void) const;
131 void SetHitCoast(bool const);
132 bool bHitCoast(void) const;
133 void SetTooShort(bool const);
134 bool bTooShort(void) const;
135 void SetTruncated(bool const);
136 bool bTruncated(void) const;
137 void SetHitAnotherProfileBadly(bool const);
138 bool bHitAnotherProfileBadly(void) const;
139
140 bool bProfileOK(void) const;
141 bool bProfileOKIncTruncated(void) const;
142 bool bOKIncStartAndEndOfCoast(void) const;
143 // bool bOKIncStartOfCoast(void) const;
144
145 void SetPointsInProfile(vector<CGeom2DPoint> const*);
146 void SetPointInProfile(int const, double const, double const);
147 void AppendPointInProfile(double const, double const);
149 void TruncateProfile(int const);
150// void TruncateAndSetPointInProfile(int const, double const, double const);
151 bool bInsertIntersection(double const, double const, int const);
152// void ShowProfile(void) const;
153 int nGetProfileSize(void) const;
155 vector<CGeom2DPoint> PtVGetThisPointAndAllAfter(int const);
156 // void RemoveLineSegment(int const);
157 bool bIsPointInProfile(double const, double const);
158 bool bIsPointInProfile(double const, double const, int&);
159// int nFindInsertionLineSeg(double const, double const);
160
161// void AppendPointShared(bool const);
162// bool bPointShared(int const) const;
163
168
170 void AppendCellInProfile(int const, int const);
171// void SetCellsInProfile(vector<CGeom2DIPoint>*);
172 vector<CGeom2DIPoint>* pPtiVGetCellsInProfile(void);
174 int nGetNumCellsInProfile(void) const;
175
176 void AppendCellInProfileExtCRS(double const, double const);
178// vector<CGeom2DPoint>* PtVGetCellsInProfileExtCRS(void);
179
180 int nGetCellGivenDepth(CGeomRasterGrid const*, double const);
181
182 void SetProfileDeepWaterWaveHeight(double const);
183 double dGetProfileDeepWaterWaveHeight(void) const;
184
185 void SetProfileDeepWaterWaveAngle(double const);
186 double dGetProfileDeepWaterWaveAngle(void) const;
187
188 void SetProfileDeepWaterWavePeriod(double const);
189 double dGetProfileDeepWaterWavePeriod(void) const;
190
191 bool bIsIntervention(void) const;
192};
193#endif //PROFILE_H
194
Contains CGeom2DPoint definitions.
Contains CGeom2DIPoint definitions.
Geometry class used to represent 2D point objects with integer coordinates.
Definition 2di_point.h:29
Geometry class used to represent 2D point objects with floating-point coordinates.
Definition 2d_point.h:27
CGeomMultiLine(void)
Constructor, no parameters.
bool m_bStartOfCoast
Is this a start-of-coast profile?
Definition profile.h:38
void TruncateProfile(int const)
Truncates the profile.
Definition profile.cpp:305
int m_nCoastPoint
The coastline point at which this profile hits the coast (not necessarily coincident wih the profile ...
Definition profile.h:68
double m_dDeepWaterWaveHeight
The wave height at the end of the profile.
Definition profile.h:77
CGeomProfile * m_pUpCoastAdjacentProfile
Pointer to the adjacent up-coast profile (may be an invalid profile)
Definition profile.h:92
int nGetCellGivenDepth(CGeomRasterGrid const *, double const)
Returns the index of the cell on this profile which has a sea depth which is just less than a given d...
Definition profile.cpp:516
void SetEndOfCoast(bool const)
Sets a switch to indicate whether this is an end-of-coast profile.
Definition profile.cpp:114
bool m_bHitCoast
Has this profile hit a coastline?
Definition profile.h:50
void AppendPointInProfile(double const, double const)
Appends a point to the profile.
Definition profile.cpp:274
double dGetProfileDeepWaterWaveAngle(void) const
Returns the deep-water wave orientation for this profile.
Definition profile.cpp:565
double dGetProfileDeepWaterWaveHeight(void) const
Returns the deep-water wave height for this profile.
Definition profile.cpp:553
int m_nCoastID
The this-coast ID of the profile.
Definition profile.h:71
int m_nGlobalID
The global ID of the profile.
Definition profile.h:74
int nGetCoastPoint(void) const
Returns the coast point at which the profile starts.
Definition profile.cpp:78
void SetProfileDeepWaterWavePeriod(double const)
Sets the deep-water wave Period for this profile.
Definition profile.cpp:571
bool m_bIntervention
Is this an intervention profile?
Definition profile.h:62
bool bIsPointInProfile(double const, double const)
Removes a line segment from the profile.
Definition profile.cpp:351
void SetHitCoast(bool const)
Sets a switch which indicates whether this profile has hit a coast.
Definition profile.cpp:150
vector< CGeom2DPoint > m_VCellInProfileExtCRS
In external CRS, the coords of cells 'under' this profile.
Definition profile.h:102
CGeomProfile * m_pDownCoastAdjacentProfile
Pointer to the adjacent down-coast profile (may be an invalid profile)
Definition profile.h:95
bool bHitAnotherProfileBadly(void) const
Returns the switch which indicates whether this profile hits another profile badly.
Definition profile.cpp:192
bool m_bCShoreProblem
Has this profile encountered a CShore problem?
Definition profile.h:44
bool bProfileOKIncTruncated(void) const
Returns true if this is a problem-free profile, and is not a start-of-coast or an end-of-coast profil...
Definition profile.cpp:215
void SetStartOfCoast(bool const)
Sets a switch to indicate whether this is a start-of-coast profile.
Definition profile.cpp:102
CGeomProfile * pGetUpCoastAdjacentProfile(void) const
Definition profile.cpp:439
CGeomProfile * pGetDownCoastAdjacentProfile(void) const
Definition profile.cpp:449
void AppendCellInProfileExtCRS(double const, double const)
Appends a cell (specified in the external coordinate system) to the profile.
Definition profile.cpp:502
void SetUpCoastAdjacentProfile(CGeomProfile *)
Definition profile.cpp:434
double m_dDeepWaterWaveAngle
The wave orientation at the end of the profile.
Definition profile.h:80
CGeom2DIPoint * pPtiGetCellInProfile(int const)
Returns a single cell in the profile.
Definition profile.cpp:482
bool m_bHitAnotherProfileBadly
Has this profile hit another profile?
Definition profile.h:59
vector< CGeom2DPoint > PtVGetThisPointAndAllAfter(int const)
Returns a given point from the profile, and all points after this.
Definition profile.cpp:338
void SetTruncated(bool const)
Sets a switch which indicates whether this profile is truncated.
Definition profile.cpp:174
bool bInsertIntersection(double const, double const, int const)
Inserts an intersection into the profile.
Definition profile.cpp:286
CGeom2DIPoint PtiEnd
The seaward end point of the profile in grid CRS.
Definition profile.h:89
bool bHitLand(void) const
Returns the switch which indicates whether this profile has hit land.
Definition profile.cpp:144
CGeom2DIPoint PtiStart
The on-coast start point of the profile in grid CRS.
Definition profile.h:86
int nGetNumCellsInProfile(void) const
Returns the number of cells in the profile.
Definition profile.cpp:489
CGeomProfile(int const, int const, int const, int const, CGeom2DIPoint const *, CGeom2DIPoint const *, bool const)
Constructor with initialization list, requires one parameter (the coast point at which the profile st...
Definition profile.cpp:36
vector< CGeom2DIPoint > m_VCellInProfile
In the grid CRS, the integer coordinates of the cells 'under' this profile, point zero is the same as...
Definition profile.h:98
bool bProfileOK(void) const
Returns true if this is a problem-free profile, and is not a start-of-coast or an end-of-coast profil...
Definition profile.cpp:198
void SetProfileDeepWaterWaveHeight(double const)
Sets the deep-water wave height for this profile.
Definition profile.cpp:547
bool bTooShort(void) const
Returns the switch which indicates whether this profile is too short to be useful.
Definition profile.cpp:168
void SetDownCoastAdjacentProfile(CGeomProfile *)
Definition profile.cpp:444
bool bHitCoast(void) const
Returns the switch which indicates whether this profile has hit a coast.
Definition profile.cpp:156
bool bIsIntervention(void) const
Returns true if this is an intervention profile.
Definition profile.cpp:583
int nGetGlobalID(void) const
Returns the profile's global ID.
Definition profile.cpp:72
bool m_bEndOfCoast
Is this an end-of-coast profile?
Definition profile.h:41
~CGeomProfile(void) override
Destructor.
Definition profile.cpp:61
bool m_bTruncated
Has this profile been truncated?
Definition profile.h:56
CGeom2DIPoint * pPtiGetEndPoint(void)
Returns a pointer to the location of the cell (grid CRS) on which the profile ends.
Definition profile.cpp:96
void SetCShoreProblem(bool const)
Sets a switch to indicate whether this profile has a CShore problem.
Definition profile.cpp:126
CGeom2DPoint * pPtGetPointInProfile(int const)
Returns a single point in the profile.
Definition profile.cpp:332
bool bOKIncStartAndEndOfCoast(void) const
Returns true if this is a problem-free profile (however it could be a start-of-coast or an end-of-coa...
Definition profile.cpp:231
int nGetCoastID(void) const
Returns the profile's coast ID.
Definition profile.cpp:66
void AppendCellInProfile(CGeom2DIPoint const *)
Appends a cell to the profile.
Definition profile.cpp:455
void SetPointInProfile(int const, double const, double const)
Sets a single point in the profile.
Definition profile.cpp:267
void SetHitAnotherProfileBadly(bool const)
Sets a switch which indicates whether this profile hits another profile badly.
Definition profile.cpp:186
int nGetProfileSize(void) const
Returns the number of points in the profile.
Definition profile.cpp:325
CGeom2DIPoint * pPtiGetStartPoint(void)
Returns a pointer to the location of the cell (grid CRS) on which the profile starts.
Definition profile.cpp:84
bool m_bTooShort
Is this profile too short?
Definition profile.h:53
bool bStartOfCoast(void) const
Returns the switch to indicate whether this is a start-of-coast profile.
Definition profile.cpp:108
void SetEndPoint(CGeom2DIPoint const *)
Sets the the location of the cell (grid CRS) on which the profile ends.
Definition profile.cpp:90
bool bTruncated(void) const
Returns the switch which indicates whether this profile is truncated.
Definition profile.cpp:180
void SetHitLand(bool const)
Sets a switch which indicates whether this profile has hit land.
Definition profile.cpp:138
void SetPointsInProfile(vector< CGeom2DPoint > const *)
Sets all points in the profile.
Definition profile.cpp:261
int m_nCoast
The coast from which this profile projects.
Definition profile.h:65
vector< CGeom2DIPoint > * pPtiVGetCellsInProfile(void)
Returns all cells in the profile.
Definition profile.cpp:475
double m_dDeepWaterWavePeriod
The wave period at the end of the profile.
Definition profile.h:83
bool bEndOfCoast(void) const
Returns the switch to indicate whether this is an end-of-coast profile.
Definition profile.cpp:120
double dGetProfileDeepWaterWavePeriod(void) const
Returns the deep-water wave Period for this profile.
Definition profile.cpp:577
bool bCShoreProblem(void) const
Returns the switch which indicates whether this profile has a CShore problem.
Definition profile.cpp:132
void SetProfileDeepWaterWaveAngle(double const)
Sets the deep-water wave orientation for this profile.
Definition profile.cpp:559
bool m_bHitLand
Has this profile hit land?
Definition profile.h:47
void SetTooShort(bool const)
Sets a switch which indicates whether this profile is too short to be useful.
Definition profile.cpp:162
Geometry cass used to represent the raster grid of cell objects.
Definition raster_grid.h:35
This file contains global definitions for CoastalME.
Contains CGeomMultiLine definitions.
Contains CGeomRasterGrid definitions.