Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsMapDataFeaturesFactory.cs =================================================================== diff -u -r1e07c6eef1c8cdc531e12e6c5429838757972142 -rf718135c08ce7b90cc0eaf40bfb83c9af48a1776 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsMapDataFeaturesFactory.cs (.../RingtoetsMapDataFeaturesFactory.cs) (revision 1e07c6eef1c8cdc531e12e6c5429838757972142) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsMapDataFeaturesFactory.cs (.../RingtoetsMapDataFeaturesFactory.cs) (revision f718135c08ce7b90cc0eaf40bfb83c9af48a1776) @@ -144,14 +144,17 @@ return new MapFeature[0]; } - var features = new List(); - foreach (var dikeProfile in dikeProfiles) + return dikeProfiles.Select(dikeProfile => GetAsSingleMapFeature(GetWorldPoints(dikeProfile))).ToArray(); + } + + public static MapFeature[] CreateForeshoreProfilesFeatures(IEnumerable foreshoreProfiles) + { + if (foreshoreProfiles == null || !foreshoreProfiles.Any()) { - features.Add(GetAsSingleMapFeature(GetWorldPoints(dikeProfile))); - features.Add(GetAsSingleMapFeature(GetWorldPoints(dikeProfile.ForeshoreProfile))); + return new MapFeature[0]; } - return features.ToArray(); + return foreshoreProfiles.Select(foreshoreProfile => GetAsSingleMapFeature(GetWorldPoints(foreshoreProfile))).ToArray(); } private static Point2D[] GetWorldPoints(DikeProfile dikeProfile)