Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/ReferenceLineMeta.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/ReferenceLineMeta.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/ReferenceLineMeta.cs (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1,44 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Ringtoets.Common.Data.AssessmentSection
+{
+ ///
+ /// Class representing the reference line with meta data used as a basis for assessment.
+ ///
+ public class ReferenceLineMeta : ReferenceLine
+ {
+ ///
+ /// Gets or sets the unique identifier within a registration.
+ ///
+ public string ReferenceLineId { get; set; }
+
+ ///
+ /// Gets or sets the signaling value for the assessment section.
+ ///
+ public int? SignalingValue { get; set; }
+
+ ///
+ /// Gets or sets the lower limit of the assessment section.
+ ///
+ public int? LowerLimitValue { get; set; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -r9ee17a39e4ba653cfc2e1a576f0ac53dcdf8a7dc -r8ab20e71c86b0a20f269eb7122efee529011136b
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 9ee17a39e4ba653cfc2e1a576f0ac53dcdf8a7dc)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -42,6 +42,7 @@
+
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs
===================================================================
diff -u -r7dd0e37f171e62ef092707ffbc63dd64f5e9b674 -r8ab20e71c86b0a20f269eb7122efee529011136b
--- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7dd0e37f171e62ef092707ffbc63dd64f5e9b674)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -183,5 +183,32 @@
return ResourceManager.GetString("ReferenceLineReader_File_must_contain_1_polyline", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Het bestand heeft geen attribuut '{0}'. Dit attribuut is vereist..
+ ///
+ public static string ReferenceLinesMetaReader_File_lacks_required_Attribute_0_ {
+ get {
+ return ResourceManager.GetString("ReferenceLinesMetaReader_File_lacks_required_Attribute_0_", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het bestand heeft de attributen '{0}' niet. Deze attributen zijn vereist..
+ ///
+ public static string ReferenceLinesMetaReader_File_lacks_required_Attributes_0_ {
+ get {
+ return ResourceManager.GetString("ReferenceLinesMetaReader_File_lacks_required_Attributes_0_", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het bestand bevat geen waarde voor 'TrackID'..
+ ///
+ public static string ReferenceLinesMetaReader_TrajectId_is_empty {
+ get {
+ return ResourceManager.GetString("ReferenceLinesMetaReader_TrajectId_is_empty", resourceCulture);
+ }
+ }
}
}
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx
===================================================================
diff -u -r7dd0e37f171e62ef092707ffbc63dd64f5e9b674 -r8ab20e71c86b0a20f269eb7122efee529011136b
--- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 7dd0e37f171e62ef092707ffbc63dd64f5e9b674)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -159,4 +159,13 @@
{0} shape bestand (*.shp)|*.shp
+
+ Het bestand heeft de attributen '{0}' niet. Deze attributen zijn vereist.
+
+
+ Het bestand heeft geen attribuut '{0}'. Dit attribuut is vereist.
+
+
+ Het bestand bevat geen waarde voor 'TrackID'.
+
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLinesMetaReader.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLinesMetaReader.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLinesMetaReader.cs (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1,232 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Core.Common.Base.Geometry;
+using Core.Common.IO.Exceptions;
+using Core.Common.Utils;
+using Core.Common.Utils.Builders;
+using Core.Common.Utils.Properties;
+using Core.Components.Gis.Data;
+using Core.Components.Gis.Features;
+using Core.Components.Gis.IO.Readers;
+using Ringtoets.Common.Data.AssessmentSection;
+using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Ringtoets.Common.IO
+{
+ ///
+ /// Shape file reader that reads objects based on the line feature in the file.
+ ///
+ public class ReferenceLinesMetaReader : IDisposable
+ {
+ private const string referenceLineIdAttributeKey = "TRAJECT_ID";
+ private const string signalingValueAttributeKey = "NORM_SW";
+ private const string lowerLimitValueAttributeKey = "NORM_OG";
+ private readonly PolylineShapeFileReader polylineShapeFileReader;
+
+ ///
+ /// Initializes a new instance of the class and validates the file.
+ ///
+ /// The file path to the shape file.
+ /// Thrown when:
+ ///
+ /// - points to a file that does not exist.
+ /// - The shape file does not contain the required attributes.
+ ///
+ public ReferenceLinesMetaReader(string shapeFilePath)
+ {
+ FileUtils.ValidateFilePath(shapeFilePath);
+ if (!File.Exists(shapeFilePath))
+ {
+ string message = new FileReaderErrorMessageBuilder(shapeFilePath)
+ .Build(Resources.Error_File_does_not_exist);
+ throw new CriticalFileReadException(message);
+ }
+
+ polylineShapeFileReader = OpenPolyLineShapeFile(shapeFilePath);
+
+ ValidateExistenceOfRequiredAttributes();
+ }
+
+ ///
+ /// Gets the number of reference lines in the shape file.
+ ///
+ public int GetReferenceLinesCount()
+ {
+ return polylineShapeFileReader.GetNumberOfLines();
+ }
+
+ ///
+ /// Reads the current feature in the shape file into a .
+ ///
+ /// The created .
+ /// Thrown when current feature in the shape file:
+ ///
+ /// - Has an empty track id.
+ /// - Does not contain poly lines.
+ /// - Contains multiple poly lines.
+ ///
+ public ReferenceLineMeta ReadReferenceLinesMeta()
+ {
+ var lineData = ReadMapLineData();
+ return lineData == null ? null : CreateReferenceLineMeta(lineData);
+ }
+
+ public void Dispose()
+ {
+ polylineShapeFileReader.Dispose();
+ }
+
+ private void ValidateExistenceOfRequiredAttributes()
+ {
+ var hasAssessmentSectionIdAttribute = polylineShapeFileReader.HasAttribute(referenceLineIdAttributeKey);
+ var hasSignalingValueAttribute = polylineShapeFileReader.HasAttribute(signalingValueAttributeKey);
+ var hasLowerLimitValueAttribute = polylineShapeFileReader.HasAttribute(lowerLimitValueAttributeKey);
+
+ if (hasAssessmentSectionIdAttribute && hasSignalingValueAttribute && hasLowerLimitValueAttribute)
+ {
+ return;
+ }
+
+ var message = "";
+ if (hasAssessmentSectionIdAttribute && hasSignalingValueAttribute)
+ {
+ // No low limit
+ message = string.Format(RingtoetsCommonIOResources.ReferenceLinesMetaReader_File_lacks_required_Attribute_0_,
+ lowerLimitValueAttributeKey);
+ throw new CriticalFileReadException(message);
+ }
+
+ if (hasAssessmentSectionIdAttribute && hasLowerLimitValueAttribute)
+ {
+ // No signaling value
+ message = string.Format(RingtoetsCommonIOResources.ReferenceLinesMetaReader_File_lacks_required_Attribute_0_,
+ signalingValueAttributeKey);
+ throw new CriticalFileReadException(message);
+ }
+
+ if (hasSignalingValueAttribute && hasLowerLimitValueAttribute)
+ {
+ // No Assessment Section Id
+ message = string.Format(RingtoetsCommonIOResources.ReferenceLinesMetaReader_File_lacks_required_Attribute_0_,
+ referenceLineIdAttributeKey);
+ throw new CriticalFileReadException(message);
+ }
+
+ // Multiple attributes not found
+ var missingAttributes = new List();
+ if (!hasAssessmentSectionIdAttribute)
+ {
+ missingAttributes.Add(referenceLineIdAttributeKey);
+ }
+ if (!hasSignalingValueAttribute)
+ {
+ missingAttributes.Add(signalingValueAttributeKey);
+ }
+ if (!hasLowerLimitValueAttribute)
+ {
+ missingAttributes.Add(lowerLimitValueAttributeKey);
+ }
+
+ message = string.Format(RingtoetsCommonIOResources.ReferenceLinesMetaReader_File_lacks_required_Attributes_0_,
+ string.Join("', '", missingAttributes));
+
+ throw new CriticalFileReadException(message);
+ }
+
+ private static PolylineShapeFileReader OpenPolyLineShapeFile(string shapeFilePath)
+ {
+ return new PolylineShapeFileReader(shapeFilePath);
+ }
+
+ ///
+ /// Reads a new from the file.
+ ///
+ ///
+ private MapLineData ReadMapLineData()
+ {
+ return polylineShapeFileReader.ReadLine() as MapLineData;
+ }
+
+ private static ReferenceLineMeta CreateReferenceLineMeta(MapLineData lineData)
+ {
+ var features = lineData.Features.ToArray();
+
+ var feature = features[0];
+
+ var referenceLineId = GetReferenceLineId(feature);
+ var signalingValue = GetSignalingValueAttributeKey(feature);
+ var lowerLimitValue = GetLowerLimitValueAttribute(feature);
+ IEnumerable geometryPoints = GetSectionGeometry(feature);
+
+ var referenceLineMeta = new ReferenceLineMeta
+ {
+ ReferenceLineId = referenceLineId
+ };
+ if (lowerLimitValue != null)
+ {
+ referenceLineMeta.LowerLimitValue = lowerLimitValue.Value;
+ }
+ if (signalingValue != null)
+ {
+ referenceLineMeta.SignalingValue = signalingValue.Value;
+ }
+ referenceLineMeta.SetGeometry(geometryPoints);
+
+ return referenceLineMeta;
+ }
+
+ private static IEnumerable GetSectionGeometry(MapFeature lineFeature)
+ {
+ var mapGeometries = lineFeature.MapGeometries.ToArray();
+ if (mapGeometries.Length > 1)
+ {
+ throw new CriticalFileReadException(RingtoetsCommonIOResources.ReferenceLineReader_File_contains_unsupported_multi_polyline);
+ }
+
+ return mapGeometries[0].PointCollections.First().Select(p => new Point2D(p.X, p.Y));
+ }
+
+ private static string GetReferenceLineId(MapFeature lineFeature)
+ {
+ var referenceLineId = Convert.ToString(lineFeature.MetaData[referenceLineIdAttributeKey]);
+ if (String.IsNullOrEmpty(referenceLineId))
+ {
+ throw new CriticalFileReadException(RingtoetsCommonIOResources.ReferenceLinesMetaReader_TrajectId_is_empty);
+ }
+ return referenceLineId;
+ }
+
+ private static int? GetSignalingValueAttributeKey(MapFeature lineFeature)
+ {
+ return lineFeature.MetaData[signalingValueAttributeKey] as int?;
+ }
+
+ private static int? GetLowerLimitValueAttribute(MapFeature lineFeature)
+ {
+ return lineFeature.MetaData[lowerLimitValueAttributeKey] as int?;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj
===================================================================
diff -u -rbc7bdcd2b6c23afc7f3e92b31e583cf0453a3019 -r8ab20e71c86b0a20f269eb7122efee529011136b
--- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision bc7bdcd2b6c23afc7f3e92b31e583cf0453a3019)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -47,6 +47,7 @@
Properties\GlobalAssembly.cs
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/ReferenceLineMetaTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/ReferenceLineMetaTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/ReferenceLineMetaTest.cs (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1,41 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using NUnit.Framework;
+using Ringtoets.Common.Data.AssessmentSection;
+
+namespace Ringtoets.Common.Data.Test.AssessmentSection
+{
+ [TestFixture]
+ public class ReferenceLineMetaTest
+ {
+ [Test]
+ public void DefaultConstructor_ExpectedValues()
+ {
+ // Call
+ var referenceLine = new ReferenceLineMeta();
+
+ // Assert
+ Assert.IsInstanceOf(referenceLine);
+ CollectionAssert.IsEmpty(referenceLine.Points);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -r4c3daa6c52d8de89a58df080ea82b72b1855e534 -r8ab20e71c86b0a20f269eb7122efee529011136b
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 4c3daa6c52d8de89a58df080ea82b72b1855e534)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -57,6 +57,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLinesMetaReaderTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLinesMetaReaderTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLinesMetaReaderTest.cs (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1,303 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.IO;
+using System.Linq;
+using Core.Common.Base.Geometry;
+using Core.Common.IO.Exceptions;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.Common.Data.AssessmentSection;
+
+namespace Ringtoets.Common.IO.Test
+{
+ [TestFixture]
+ public class ReferenceLinesMetaReaderTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "NBPW.shp");
+
+ // Call
+ using (var reader = new ReferenceLinesMetaReader(validFilePath))
+ {
+ // Assert
+ Assert.IsInstanceOf(reader);
+ }
+
+ Assert.True(TestHelper.CanOpenFileForWrite(validFilePath));
+ }
+
+ [Test]
+ [TestCase("")]
+ [TestCase(" ")]
+ [TestCase(null)]
+ public void Constructor_NoFilePath_ThrowArgumentException(string invalidFilePath)
+ {
+ // Call
+ TestDelegate call = () => new ReferenceLinesMetaReader(invalidFilePath);
+
+ // Assert
+ var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Bestandspad mag niet leeg of ongedefinieerd zijn.",
+ invalidFilePath);
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage);
+ }
+
+ [Test]
+ public void Constructor_FilePathHasInvalidPathCharacter_ThrowArgumentException()
+ {
+ // Setup
+ char[] invalidFileNameChars = Path.GetInvalidFileNameChars();
+
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "NBPW.shp");
+ string invalidFilePath = validFilePath.Replace("P", invalidFileNameChars[1].ToString());
+
+ // Call
+ TestDelegate call = () => new ReferenceLinesMetaReader(invalidFilePath);
+
+ // Assert
+ var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Bestandspad mag niet de volgende tekens bevatten: {1}",
+ invalidFilePath, String.Join(", ", invalidFileNameChars));
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage);
+ }
+
+ [Test]
+ public void Constructor_FilePathIsActuallyDirectoryPath_ThrowArgumentException()
+ {
+ // Setup
+ string invalidFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ Path.DirectorySeparatorChar.ToString());
+
+ // Call
+ TestDelegate call = () => new ReferenceLinesMetaReader(invalidFilePath);
+
+ // Assert
+ var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Bestandspad mag niet naar een map verwijzen.",
+ invalidFilePath);
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage);
+ }
+
+ [Test]
+ public void Constructor_ShapefileDoesntExist_ThrowCriticalFileReadException()
+ {
+ // Setup
+ string invalidFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "I_do_not_exist.shp");
+
+ // Call
+ TestDelegate call = () => new ReferenceLinesMetaReader(invalidFilePath);
+
+ // Assert
+ var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand bestaat niet.",
+ invalidFilePath);
+ var message = Assert.Throws(call).Message;
+ Assert.AreEqual(expectedMessage, message);
+ }
+
+ [Test]
+ [TestCase("Multiple_Point_with_ID.shp")]
+ [TestCase("Multiple_Polygon_with_ID.shp")]
+ [TestCase("Single_Multi-Polygon_with_ID.shp")]
+ [TestCase("Single_Point_with_ID.shp")]
+ [TestCase("Single_Polygon_with_ID.shp")]
+ public void Constructor_ShapefileDoesNotHaveSinglePolyline_ThrowCriticalFileReadException(string shapeFileName)
+ {
+ // Setup
+ string invalidFilePath = TestHelper.GetTestDataPath(TestDataPath.Core.Components.Gis.IO,
+ shapeFileName);
+
+ TestDelegate call = () => new ReferenceLinesMetaReader(invalidFilePath);
+
+ // Assert .
+ var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Bestand bevat geometrieën die geen lijn zijn.",
+ invalidFilePath);
+ var message = Assert.Throws(call).Message;
+ Assert.AreEqual(expectedMessage, message);
+ }
+
+ [Test]
+ [TestCase("NBPW_MultiPolyLines.shp")]
+ public void ReadReferenceLinesMeta_ShapefileHasMultiplePolylines_ThrowCriticalFileReadException(string shapeFileName)
+ {
+ // Setup
+ string invalidFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ shapeFileName);
+
+ using (var reader = new ReferenceLinesMetaReader(invalidFilePath))
+ {
+ // Call
+ TestDelegate call = () => reader.ReadReferenceLinesMeta();
+
+ // Assert
+ var expectedMessage = "Het bestand bevat een multi-polylijn. Multi-polylijnen worden niet ondersteund.";
+ var message = Assert.Throws(call).Message;
+ Assert.AreEqual(expectedMessage, message);
+ }
+ }
+
+ [Test]
+ [TestCase("NBPW.shp", 20)]
+ public void GetReferenceLinesCount_ValidFilePath_ReturnElementCount(string shapeFileName, int expectedElementCount)
+ {
+ // Setup
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ shapeFileName);
+
+ using (var reader = new ReferenceLinesMetaReader(validFilePath))
+ {
+ // Call
+ int count = reader.GetReferenceLinesCount();
+
+ // Assert
+ Assert.AreEqual(expectedElementCount, count);
+ }
+ }
+
+ [Test]
+ [TestCase("NBPW_missingTrajectId.shp", "TRAJECT_ID")]
+ [TestCase("NBPW_missingNORM_SW.shp", "NORM_SW")]
+ [TestCase("NBPW_missingNORM_OG.shp", "NORM_OG")]
+ public void Constructor_FileLacksAttribute_ThrowCriticalFileReadException(string shapeFileName, string missingAttribute)
+ {
+ // Setup
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, shapeFileName);
+
+ TestDelegate call = () => new ReferenceLinesMetaReader(validFilePath);
+
+ // Assert
+ var message = Assert.Throws(call).Message;
+ var expectedMessage = String.Format("Het bestand heeft geen attribuut '{0}'. Dit attribuut is vereist.",
+ missingAttribute);
+ Assert.AreEqual(expectedMessage, message);
+ }
+
+ [Test]
+ [TestCase("NBPW_missingAllAttributes.shp", "TRAJECT_ID', 'NORM_SW', 'NORM_OG")]
+ [TestCase("NBPW_missingTrajectIdAndNORM_SW.shp", "TRAJECT_ID', 'NORM_SW")]
+ [TestCase("NBPW_missingTrajectIdAndNORM_OG.shp", "TRAJECT_ID', 'NORM_OG")]
+ [TestCase("NBPW_missingNORM_SWAndNORM_OG.shp", "NORM_SW', 'NORM_OG")]
+ public void Constructor_FileLacksAttributes_ThrowCriticalFileReadException(string shapeFileName, string missingAttributes)
+ {
+ // Setup
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, shapeFileName);
+
+ TestDelegate call = () => new ReferenceLinesMetaReader(validFilePath);
+
+ // Assert
+ var message = Assert.Throws(call).Message;
+ var expectedMessage = String.Format("Het bestand heeft de attributen '{0}' niet. Deze attributen zijn vereist.",
+ missingAttributes);
+ Assert.AreEqual(expectedMessage, message);
+ }
+
+ [Test]
+ public void ReadReferenceLinesMeta_ValidFilePath1_ReturnsElement()
+ {
+ // Setup
+ var validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "NBPW.shp");
+
+ using (var reader = new ReferenceLinesMetaReader(validFilePath))
+ {
+ // Call
+ ReferenceLineMeta referenceLineMeta = reader.ReadReferenceLinesMeta();
+
+ // Assert
+ Assert.AreEqual("205", referenceLineMeta.ReferenceLineId);
+ Assert.AreEqual(3000, referenceLineMeta.SignalingValue);
+ Assert.AreEqual(1000, referenceLineMeta.LowerLimitValue);
+ Point2D[] geometryPoints = referenceLineMeta.Points.ToArray();
+ Assert.AreEqual(2, geometryPoints.Length);
+ Assert.AreEqual(475072.583000, geometryPoints[0].Y, 1e-6);
+ Assert.AreEqual(160892.075100, geometryPoints[1].X, 1e-6);
+
+ ReferenceLineMeta referenceLineMeta2 = reader.ReadReferenceLinesMeta();
+ Assert.AreEqual("11-1", referenceLineMeta2.ReferenceLineId);
+ }
+ }
+
+ [Test]
+ public void ReadReferenceLinesMeta_EmptyNormOgAndNormSw_ReturnsElement()
+ {
+ // Setup
+ var validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "NBPW_EmptyNormOGAndNormSW.shp");
+
+ using (var reader = new ReferenceLinesMetaReader(validFilePath))
+ {
+ // Call
+ ReferenceLineMeta referenceLineMeta = reader.ReadReferenceLinesMeta();
+
+ // Assert
+ Assert.AreEqual("46-1", referenceLineMeta.ReferenceLineId);
+ Assert.IsNull(referenceLineMeta.SignalingValue);
+ Assert.IsNull(referenceLineMeta.LowerLimitValue);
+ }
+ }
+
+ [Test]
+ public void ReadReferenceLinesMeta_EmptyTrackId_ThrowCriticalFileReadException()
+ {
+ // Setup
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "NBPW_EmptyTrackId.shp");
+
+ using (var reader = new ReferenceLinesMetaReader(validFilePath))
+ {
+ // Call
+ TestDelegate call = () => reader.ReadReferenceLinesMeta();
+
+ // Assert
+ var message = Assert.Throws(call).Message;
+ var expectedMessage = "Het bestand bevat geen waarde voor 'TrackID'.";
+ Assert.AreEqual(expectedMessage, message);
+ }
+ }
+
+ [Test]
+ public void ReadReferenceLinesMeta_ReadingToEndOfFile_ReturnNull()
+ {
+ // Setup
+ string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO,
+ "NBPW.shp");
+
+ using (var reader = new ReferenceLinesMetaReader(validFilePath))
+ {
+ int count = reader.GetReferenceLinesCount();
+ for (int i = 0; i < count; i++)
+ {
+ reader.ReadReferenceLinesMeta();
+ }
+
+ // Call
+ var resultBeyondEndOfFile = reader.ReadReferenceLinesMeta();
+
+ // Assert
+ Assert.IsNull(resultBeyondEndOfFile);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj
===================================================================
diff -u -rbc7bdcd2b6c23afc7f3e92b31e583cf0453a3019 -r8ab20e71c86b0a20f269eb7122efee529011136b
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision bc7bdcd2b6c23afc7f3e92b31e583cf0453a3019)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -49,6 +49,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyNormOGAndNormSW.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_EmptyTrackId.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_MultiPolyLines.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingAllAttributes.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_OG.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SW.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingNORM_SWAndNORM_OG.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectId.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_OG.shx
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.dbf
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.prj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.prj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.prj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort_RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Double_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.qpj
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.qpj (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.qpj (revision 8ab20e71c86b0a20f269eb7122efee529011136b)
@@ -0,0 +1 @@
+PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","28992"]]
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.shp
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/NBPW_missingTrajectIdAndNORM_SW.shx
===================================================================
diff -u
Binary files differ