Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile1DReader.cs =================================================================== diff -u -r0d2a68ed9f6d5c10c01a1cb7de3bdcba843d4ab8 -r10de4c88d71a59af9a2d7e46a94410445ce257f5 --- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile1DReader.cs (.../SoilProfile1DReader.cs) (revision 0d2a68ed9f6d5c10c01a1cb7de3bdcba843d4ab8) +++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile1DReader.cs (.../SoilProfile1DReader.cs) (revision 10de4c88d71a59af9a2d7e46a94410445ce257f5) @@ -209,162 +209,8 @@ MaterialName = properties.MaterialName ?? string.Empty }; - if (properties.IsAquifer.HasValue) - { - soilLayer.IsAquifer = properties.IsAquifer.Value.Equals(1.0); - } - if (properties.Color.HasValue) - { - soilLayer.Color = SoilLayerColorConverter.Convert(properties.Color); - } - if (properties.BelowPhreaticLevelDistribution.HasValue) - { - soilLayer.BelowPhreaticLevelDistribution = properties.BelowPhreaticLevelDistribution.Value; - } - if (properties.BelowPhreaticLevelShift.HasValue) - { - soilLayer.BelowPhreaticLevelShift = properties.BelowPhreaticLevelShift.Value; - } - if (properties.BelowPhreaticLevelMean.HasValue) - { - soilLayer.BelowPhreaticLevelMean = properties.BelowPhreaticLevelMean.Value; - } - if (properties.BelowPhreaticLevelDeviation.HasValue) - { - soilLayer.BelowPhreaticLevelDeviation = properties.BelowPhreaticLevelDeviation.Value; - } - if (properties.DiameterD70Distribution.HasValue) - { - soilLayer.DiameterD70Distribution = properties.DiameterD70Distribution.Value; - } - if (properties.DiameterD70Shift.HasValue) - { - soilLayer.DiameterD70Shift = properties.DiameterD70Shift.Value; - } - if (properties.DiameterD70Mean.HasValue) - { - soilLayer.DiameterD70Mean = properties.DiameterD70Mean.Value; - } - if (properties.DiameterD70CoefficientOfVariation.HasValue) - { - soilLayer.DiameterD70CoefficientOfVariation = properties.DiameterD70CoefficientOfVariation.Value; - } - if (properties.PermeabilityDistribution.HasValue) - { - soilLayer.PermeabilityDistribution = properties.PermeabilityDistribution.Value; - } - if (properties.PermeabilityShift.HasValue) - { - soilLayer.PermeabilityShift = properties.PermeabilityShift.Value; - } - if (properties.PermeabilityMean.HasValue) - { - soilLayer.PermeabilityMean = properties.PermeabilityMean.Value; - } - if (properties.PermeabilityCoefficientOfVariation.HasValue) - { - soilLayer.PermeabilityCoefficientOfVariation = properties.PermeabilityCoefficientOfVariation.Value; - } - soilLayer.UsePop = properties.UsePop; - soilLayer.ShearStrengthModel = properties.ShearStrengthModel; + SoilLayerHelper.SetSoilLayerBaseProperties(soilLayer, properties); - if (properties.AbovePhreaticLevelDistribution.HasValue) - { - soilLayer.AbovePhreaticLevelDistribution = properties.AbovePhreaticLevelDistribution.Value; - } - if (properties.AbovePhreaticLevelShift.HasValue) - { - soilLayer.AbovePhreaticLevelShift = properties.AbovePhreaticLevelShift.Value; - } - if (properties.AbovePhreaticLevelMean.HasValue) - { - soilLayer.AbovePhreaticLevelMean = properties.AbovePhreaticLevelMean.Value; - } - if (properties.AbovePhreaticLevelCoefficientOfVariation.HasValue) - { - soilLayer.AbovePhreaticLevelDeviation = properties.AbovePhreaticLevelCoefficientOfVariation.Value; - } - if (properties.CohesionDistribution.HasValue) - { - soilLayer.CohesionDistribution = properties.CohesionDistribution.Value; - } - if (properties.CohesionShift.HasValue) - { - soilLayer.CohesionShift = properties.CohesionShift.Value; - } - if (properties.CohesionMean.HasValue) - { - soilLayer.CohesionMean = properties.CohesionMean.Value; - } - if (properties.CohesionCoefficientOfVariation.HasValue) - { - soilLayer.CohesionDeviation = properties.CohesionCoefficientOfVariation.Value; - } - if (properties.FrictionAngleDistribution.HasValue) - { - soilLayer.FrictionAngleDistribution = properties.FrictionAngleDistribution.Value; - } - if (properties.FrictionAngleShift.HasValue) - { - soilLayer.FrictionAngleShift = properties.FrictionAngleShift.Value; - } - if (properties.FrictionAngleMean.HasValue) - { - soilLayer.FrictionAngleMean = properties.FrictionAngleMean.Value; - } - if (properties.FrictionAngleCoefficientOfVariation.HasValue) - { - soilLayer.FrictionAngleDeviation = properties.FrictionAngleCoefficientOfVariation.Value; - } - if (properties.ShearStrengthRatioDistribution.HasValue) - { - soilLayer.ShearStrengthRatioDistribution = properties.ShearStrengthRatioDistribution.Value; - } - if (properties.ShearStrengthRatioShift.HasValue) - { - soilLayer.ShearStrengthRatioShift = properties.ShearStrengthRatioShift.Value; - } - if (properties.ShearStrengthRatioMean.HasValue) - { - soilLayer.ShearStrengthRatioMean = properties.ShearStrengthRatioMean.Value; - } - if (properties.ShearStrengthRatioCoefficientOfVariation.HasValue) - { - soilLayer.ShearStrengthRatioDeviation = properties.ShearStrengthRatioCoefficientOfVariation.Value; - } - if (properties.StrengthIncreaseExponentDistribution.HasValue) - { - soilLayer.StrengthIncreaseExponentDistribution = properties.StrengthIncreaseExponentDistribution.Value; - } - if (properties.StrengthIncreaseExponentShift.HasValue) - { - soilLayer.StrengthIncreaseExponentShift = properties.StrengthIncreaseExponentShift.Value; - } - if (properties.StrengthIncreaseExponentMean.HasValue) - { - soilLayer.StrengthIncreaseExponentMean = properties.StrengthIncreaseExponentMean.Value; - } - if (properties.StrengthIncreaseExponentCoefficientOfVariation.HasValue) - { - soilLayer.StrengthIncreaseExponentDeviation = properties.StrengthIncreaseExponentCoefficientOfVariation.Value; - } - if (properties.PopDistribution.HasValue) - { - soilLayer.PopDistribution = properties.PopDistribution.Value; - } - if (properties.PopShift.HasValue) - { - soilLayer.PopShift = properties.PopShift.Value; - } - if (properties.PopMean.HasValue) - { - soilLayer.PopMean = properties.PopMean.Value; - } - if (properties.PopCoefficientOfVariation.HasValue) - { - soilLayer.PopDeviation = properties.PopCoefficientOfVariation.Value; - } - return soilLayer; }