Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Dike.cs =================================================================== diff -u -r6171 -r6404 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Dike.cs (.../Dike.cs) (revision 6171) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Dike.cs (.../Dike.cs) (revision 6404) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2024. All rights reserved. +// Copyright (C) Stichting Deltares 2025. All rights reserved. // // This file is part of the Dam Engine. // @@ -55,7 +55,7 @@ public Dike() { Name = "Dijkring"; - + locations = new List(); soilProfiles = new List(); soilProfiles2D = new List(); @@ -139,7 +139,7 @@ soilList = value; } } - + /// /// Gets or sets the degree of consolidation per material due to the traffic load. /// @@ -198,7 +198,7 @@ foreach (Location location in Locations) { ValidateLocationForPiping(isPiping, location); - + if (location.SurfaceLine != null) { var validator = new SurfaceLine2Validator(); @@ -219,6 +219,37 @@ } } + /// + /// Adapt data so it is consistent + /// + public List MakeDataConsistent() + { + List errorSoils = TryToMakeSoilDataConsistent(); + var logMessages = new List(); + // Delete all locations without surfaceline + logMessages.AddRange(DeleteLocationsWithoutSurfaceLines()); + // Delete all locations that have profiles (in their segment) which hold soils + // that are not in the soil database and so have no parameters. + logMessages.AddRange(DeleteLocationsWithProfilesWithUnknownSoils(errorSoils)); + return logMessages; + } + + public void UpdateLocation(Location location) + { + location.SoilList = SoilList; + + location.Gauges.Clear(); + location.Gauges.AddRange(Gauges); + + location.GaugePlLines.Clear(); + location.GaugePlLines.AddRange(GaugePlLines); + } + + public override string ToString() + { + return Name; + } + private static void ValidateLocationForOperational(bool isOperational, Location location) { if (!isOperational) @@ -261,37 +292,6 @@ } /// - /// Adapt data so it is consistent - /// - public List MakeDataConsistent() - { - List errorSoils = TryToMakeSoilDataConsistent(); - var logMessages = new List(); - // Delete all locations without surfaceline - logMessages.AddRange(DeleteLocationsWithoutSurfaceLines()); - // Delete all locations that have profiles (in their segment) which hold soils - // that are not in the soil database and so have no parameters. - logMessages.AddRange(DeleteLocationsWithProfilesWithUnknownSoils(errorSoils)); - return logMessages; - } - - public void UpdateLocation(Location location) - { - location.SoilList = SoilList; - - location.Gauges.Clear(); - location.Gauges.AddRange(Gauges); - - location.GaugePlLines.Clear(); - location.GaugePlLines.AddRange(GaugePlLines); - } - - public override string ToString() - { - return Name; - } - - /// /// Tries to make the soil data as read for 1D profiles consistent with the data in the soil database. /// In the end we have a neat soil list with parameters for every soil as read from the database. /// We might have a list with errors (soils that were not to be found in the database so soils for which