public void TestSTLongestLine()
        {
            using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString))
            {
                var pt   = db.Select(() => GeometryInput.STPointFromText("POINT(100 100)"));
                var line = db.Select(() => GeometryInput.STLineFromText("LINESTRING (20 80, 98 190, 110 180, 50 75)"));

                var lline1 = db.Select(() => MeasurementFunctions.STLongestLine(pt, line).STAsEWKT());

                Assert.AreEqual("LINESTRING(100 100,98 190)", lline1);
            }
        }
        public void TestSTLongestLine()
        {
            using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString))
            {
                const string PointWkt = "POINT(100 100)";
                const string LineWkt  = "LINESTRING (20 80, 98 190, 110 180, 50 75)";
                var          point    = db.Select(() => GeometryInput.STPointFromText(PointWkt));
                var          line     = db.Select(() => GeometryInput.STLineFromText(LineWkt));

                var lline1 = db.Select(() => MeasurementFunctions.STLongestLine(point, line).STAsEWKT());

                Assert.AreEqual("LINESTRING(100 100,98 190)", lline1);

                Assert.AreEqual(
                    "LINESTRING(100 100,98 190)",
                    db.Select(() => MeasurementFunctions.STLongestLine(PointWkt, LineWkt).STAsEWKT()));

                Assert.IsNull(db.Select(() => MeasurementFunctions.STLongestLine((NTSG)null, (NTSG)null)));
            }
        }