Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs
===================================================================
diff -u -ra8ffe20fbe684f5020f5158354b33fad488baac9 -rc3294111adba59fbf4a19757d1b945ec7045a19f
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs (.../ClosingStructuresInput.cs) (revision a8ffe20fbe684f5020f5158354b33fad488baac9)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs (.../ClosingStructuresInput.cs) (revision c3294111adba59fbf4a19757d1b945ec7045a19f)
@@ -20,9 +20,12 @@
// All rights reserved.
using System;
+using System.Linq;
using Core.Common.Base;
using Core.Common.Base.Data;
+using Core.Common.Base.Geometry;
using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.Probabilistics;
using Ringtoets.HydraRing.Data;
using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources;
@@ -50,6 +53,7 @@
private double failureProbabilityStructureWithErosion;
private double probabilityOpenStructureBeforeFlooding;
private RoundedDouble deviationWaveDirection;
+ private ForeshoreProfile foreshoreProfile;
public ClosingStructuresInput()
{
@@ -129,6 +133,8 @@
Mean = (RoundedDouble) 7.5
};
stormDuration.SetStandardDeviationFromVariationCoefficient(0.25);
+
+ UpdateForeshoreProperties();
}
#region Hydraulic Boundary Location
@@ -138,6 +144,7 @@
#endregion
#region Structure properties
+
///
/// Gets or sets the closing structure.
///
@@ -483,5 +490,76 @@
}
#endregion
+
+ #region Foreshore Profile
+
+ ///
+ /// Gets or sets the foreshore profile.
+ ///
+ public ForeshoreProfile ForeshoreProfile
+ {
+ get
+ {
+ return foreshoreProfile;
+ }
+ set
+ {
+ foreshoreProfile = value;
+ UpdateForeshoreProperties();
+ }
+ }
+
+ ///
+ /// Gets or sets whether the needs to be taken into account.
+ ///
+ public bool UseBreakWater { get; set; }
+
+ ///
+ /// Gets or sets whether the needs to be taken into account.
+ ///
+ public bool UseForeshore { get; set; }
+
+ ///
+ /// Gets the geometry of the foreshore.
+ ///
+ public RoundedPoint2DCollection ForeshoreGeometry
+ {
+ get
+ {
+ return foreshoreProfile != null
+ ? foreshoreProfile.Geometry
+ : new RoundedPoint2DCollection(2, Enumerable.Empty());
+ }
+ }
+
+ ///
+ /// Gets the .
+ ///
+ public BreakWater BreakWater { get; private set; }
+
+ private void UpdateForeshoreProperties()
+ {
+ if (foreshoreProfile == null)
+ {
+ UseForeshore = false;
+ UseBreakWater = false;
+ BreakWater = GetDefaultBreakWaterProperties();
+ }
+ else
+ {
+ UseForeshore = foreshoreProfile.Geometry.Count() > 1;
+ UseBreakWater = foreshoreProfile.HasBreakWater;
+ BreakWater = foreshoreProfile.HasBreakWater ?
+ new BreakWater(foreshoreProfile.BreakWater.Type, foreshoreProfile.BreakWater.Height) :
+ GetDefaultBreakWaterProperties();
+ }
+ }
+
+ private BreakWater GetDefaultBreakWaterProperties()
+ {
+ return new BreakWater(BreakWaterType.Dam, 0.0);
+ }
+
+ #endregion
}
}
\ No newline at end of file