Ejemplo n.º 1
0
        public void test_Coordinates()
        {
            //create a geomerty collection
            MultiLineString multiLS = CreateMLS();

            //this geometry conatins 10 sets of coordinates
            Assertion.AssertEquals("Coordinates-1: ", 100, multiLS.GetCoordinates().Count);

            //now try it with a null geometry collection
            GeometryFactory gf = new GeometryFactory(_precMod, _sRID);

            multiLS = gf.CreateMultiLineString(null);

            Assertion.AssertEquals("Coordinates-2: ", 0, multiLS.GetCoordinates().Count);

            //now try it with a different geometry collection
            multiLS = CreateMLS1();

            //1000 sets of coordinates
            Assertion.AssertEquals("Cordinates-3: ", 1000, multiLS.GetCoordinates().Count);
        }
Ejemplo n.º 2
0
        public void test_GetBoundary()
        {
            Polygon         poly = Poly1();
            MultiLineString mls  = poly.GetBoundary() as MultiLineString;

            Assertion.AssertEquals("GetBoundary-1: ", 1, mls.GetNumGeometries());
            Assertion.AssertEquals("GetBoundary-2: ", 9, mls.GetNumPoints());
            Coordinates coords = mls.GetCoordinates();

            for (int i = 0; i < 9; i++)
            {
                Assertion.AssertEquals("GetBoundary-3: ", true, coords[i].Equals(_exterior1.GetCoordinateN(i)));
            }
        }