public void TestSTIsPolygonCW() { const string Wkt = "POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))"; using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString)) { db.TestGeometries .Value(g => g.Id, 1) .Value(g => g.Geometry, () => GeometryInput.STGeomFromText(Wkt)) .Insert(); var result1 = db.TestGeometries .Where(g => g.Id == 1) .Select(g => g.Geometry.STIsPolygonCW()) .Single(); Assert.IsTrue(result1.HasValue); Assert.IsTrue(result1); var result2 = db.TestGeometries .Where(g => g.Id == 1) .Select(g => GeometryAccessors.STIsPolygonCW(g.Geometry.STAsText())) .Single(); Assert.IsTrue(result2.HasValue); Assert.IsTrue(result2); Assert.IsNull(db.Select(() => GeometryAccessors.STIsPolygonCW((NTSG)null))); } }