public void test_Envelope() { //create a new collection MultiLineString multiLS = CreateMLS(); //put the envelope into a geometry Geometry env = multiLS.GetEnvelope() as Geometry; //make sure there is something in the envelope Assertion.AssertEquals("Envelope-1: ", false, env.IsEmpty()); Coordinates coords = env.GetCoordinates(); //check the first set of coordinates (minX, minY) Assertion.AssertEquals("Envelope-2: ", 0.0, coords[0].X); Assertion.AssertEquals("Envelope-3: ", 5.0, coords[0].Y); //check the second set of coordinates (maxX, minY) Assertion.AssertEquals("Envelope-4: ", 18.0, coords[1].X); Assertion.AssertEquals("Envelope-5: ", 5.0, coords[1].Y); //check the third set of coordinates (maxX, maxY) Assertion.AssertEquals("Envelope-6: ", 18.0, coords[2].X); Assertion.AssertEquals("Envelope-7: ", 23.0, coords[2].Y); //check the forth set of coordinates (minX, maxY) Assertion.AssertEquals("Envelope-8: ", 0.0, coords[3].X); Assertion.AssertEquals("Envelope-9: ", 23.0, coords[3].Y); //check the fifth set of coordinates (minX, minY) Assertion.AssertEquals("Envelope-10: ", 0.0, coords[4].X); Assertion.AssertEquals("Envelope-11: ", 5.0, coords[4].Y); //create a null collection GeometryFactory gf = new GeometryFactory(_precMod, _sRID); multiLS = gf.CreateMultiLineString(null); //put the envelope into a geometry env = multiLS.GetEnvelope() as Geometry; //make sure there is something in the envelope Assertion.AssertEquals("Envelope-12: ", true, env.IsEmpty()); }