void RunRelateTest(String wkt1, String wkt2, IBoundaryNodeRule bnRule, String expectedIM)
        {
            IGeometry          g1    = rdr.Read(wkt1);
            IGeometry          g2    = rdr.Read(wkt2);
            IntersectionMatrix im    = RelateOp.Relate(g1, g2, bnRule);
            String             imStr = im.ToString();

            Console.WriteLine(imStr);
            Assert.IsTrue(im.Matches(expectedIM));
        }
        public void TestToString()
        {
            var i = new IntersectionMatrix();

            i.Set("012*TF012");
            Assert.AreEqual("012*TF012", i.ToString());

            var c = new IntersectionMatrix(i);

            Assert.AreEqual("012*TF012", c.ToString());
        }
        public void TestTranspose()
        {
            var x = new IntersectionMatrix("012*TF012");

            var i = new IntersectionMatrix(x);
            var j = i.Transpose();

            Assert.AreSame(i, j);

            Assert.AreEqual("0*01T12F2", i.ToString());

            Assert.AreEqual("012*TF012", x.ToString());
        }
Beispiel #4
0
        protected virtual bool TestRelate()
        {
            bool   bResult = (bool)m_objResult;
            string arg     = (string)m_objArgument2;

            if (m_bIsDefaultTarget && m_objGeometryA != null)
            {
                IntersectionMatrix matrix = m_objGeometryA.Relate(m_objGeometryB);

                string strMatrix = matrix.ToString();

                return((strMatrix == arg) == bResult);
            }
            else if (m_objGeometryB != null)
            {
                IntersectionMatrix matrix = m_objGeometryB.Relate(m_objGeometryA);

                string strMatrix = matrix.ToString();

                return((strMatrix == arg) == bResult);
            }

            return(false);
        }