Esempio n. 1
0
        public void TestSTGeomFromTWKB()
        {
            using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString))
            {
                var ewkt1 = db.Select(() => GeometryInput.STGeomFromTWKB(new byte[] { 0x62, 0x00, 0x02, 0xf7, 0xf4, 0x0d, 0xbc, 0xe4, 0x04, 0x01, 0x05 }).STAsEWKT());
                Assert.AreEqual("LINESTRING(-113.98 39.198,-113.981 39.195)", ewkt1);

                var ewkt2 = db.Select(() => GeometryInput.STGeomFromTWKB(null).STAsEWKT());
                Assert.IsNull(ewkt2);
            }
        }