private void CheckElevationPopulateZ(string wkt, string wktNoZ, string wktZExpected) { var geom = Read(wkt); var model = ElevationModel.Create(geom, null); var geomNoZ = Read(wktNoZ); model.PopulateZ(geomNoZ); var geomZExpected = Read(wktZExpected); CheckEqualXYZ(geomZExpected, geomNoZ); }
private void CheckElevation(Geometry geom1, Geometry geom2, double[] ords) { var model = ElevationModel.Create(geom1, geom2); int numPts = ords.Length / 3; if (3 * numPts != ords.Length) { throw new ArgumentException("Incorrect number of ordinates"); } for (int i = 0; i < numPts; i++) { double x = ords[3 * i]; double y = ords[3 * i + 1]; double expectedZ = ords[3 * i + 2]; double actualZ = model.GetZ(x, y); string msg = "Point ( " + x + ", " + y + " ) : "; Assert.That(actualZ, Is.EqualTo(expectedZ).Within(TOLERANCE), msg); } }