Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/HydraulicBoundaryLocationsWriter.cs =================================================================== diff -u -r3d995a76fbe93cf9801596e6b959e7f5bcde5805 -r3865311e0dac61da3aa9ca1b4645c16b90290f1e --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/HydraulicBoundaryLocationsWriter.cs (.../HydraulicBoundaryLocationsWriter.cs) (revision 3d995a76fbe93cf9801596e6b959e7f5bcde5805) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/HydraulicBoundaryLocationsWriter.cs (.../HydraulicBoundaryLocationsWriter.cs) (revision 3865311e0dac61da3aa9ca1b4645c16b90290f1e) @@ -37,16 +37,35 @@ /// public class HydraulicBoundaryLocationsWriter { + private readonly string designWaterLevelName; + /// + /// Creates a new instance of . + /// + /// The Dutch name of the content of the + /// property. + /// Thrown when is null. + public HydraulicBoundaryLocationsWriter(string designWaterLevelName) + { + if (designWaterLevelName == null) + { + throw new ArgumentNullException("designWaterLevelName"); + } + + this.designWaterLevelName = designWaterLevelName; + } + + /// /// Writes the locations of a as point features in a shapefile. /// /// The hydraulic boundary locations to be written to file. /// The path to the shapefile. - /// Thrown when or + /// Thrown when or /// is null. /// Thrown when is invalid. /// Thrown when the shapefile cannot be written. - public void WriteHydraulicBoundaryLocations(ICollection hydraulicBoundaryLocations, string filePath) + public void WriteHydraulicBoundaryLocations(IEnumerable hydraulicBoundaryLocations, + string filePath) { if (hydraulicBoundaryLocations == null) { @@ -67,7 +86,7 @@ pointShapeFileWriter.SaveAs(filePath); } - private MapPointData CreateMapPointData(HydraulicBoundaryLocation hydraulicBoundaryLocation) + private MapPointData CreateMapPointData(IHydraulicBoundaryLocation hydraulicBoundaryLocation) { if (hydraulicBoundaryLocation == null) { @@ -89,9 +108,9 @@ }); mapFeature.MetaData.Add("Naam", hydraulicBoundaryLocation.Name); - mapFeature.MetaData.Add("Id", hydraulicBoundaryLocation.Id); - mapFeature.MetaData.Add("Toetspeil", hydraulicBoundaryLocation.DesignWaterLevel.Value); - mapFeature.MetaData.Add("Hs", hydraulicBoundaryLocation.WaveHeight.Value); + mapFeature.MetaData.Add("ID", hydraulicBoundaryLocation.Id); + mapFeature.MetaData.Add(designWaterLevelName, hydraulicBoundaryLocation.DesignWaterLevel.Value); + mapFeature.MetaData.Add("Golfhoogte", hydraulicBoundaryLocation.WaveHeight.Value); return new MapPointData(hydraulicBoundaryLocation.Name) {