@@ -82,28 +82,36 @@ public void testPolygon() throws Exception {
8282 OGCLineString ls = p .exteriorRing ();
8383 // assertTrue(ls.pointN(1).equals(OGCGeometry.fromText("POINT(10 -10)")));
8484 boolean b = ls
85- .equals (OGCGeometry
85+ .Equals (OGCGeometry
8686 .fromText ("LINESTRING(-10 -10, 10 -10, 10 10, -10 10, -10 -10)" ));
8787 assertTrue (b );
8888 OGCLineString lsi = p .interiorRingN (0 );
89- b = lsi .equals (OGCGeometry
89+ b = lsi .Equals (OGCGeometry
9090 .fromText ("LINESTRING(-5 -5, -5 5, 5 5, 5 -5, -5 -5)" ));
9191 assertTrue (b );
9292 b = lsi .equals ((Object )OGCGeometry
9393 .fromText ("LINESTRING(-5 -5, -5 5, 5 5, 5 -5, -5 -5)" ));
94- assertTrue (!lsi .equals (ls ));
94+ assertTrue (!lsi .Equals (ls ));
9595 OGCMultiCurve boundary = p .boundary ();
9696 String s = boundary .asText ();
9797 assertTrue (s .equals ("MULTILINESTRING ((-10 -10, 10 -10, 10 10, -10 10, -10 -10), (-5 -5, -5 5, 5 5, 5 -5, -5 -5))" ));
9898
9999 {
100- OGCGeometry g2 = OGCGeometry .fromGeoJson ("{\" type\" : \" Polygon\" , \" coordinates\" : [[[1.00000001,1.00000001], [4.00000001,1.00000001], [4.00000001,4.00000001], [1.00000001,4.00000001]]]}" );
101- OGCGeometry .fromGeoJson ("{\" type\" : \" LineString\" , \" coordinates\" : [[1.00000001,1.00000001], [7.00000001,8.00000001]]}" ).intersects (g2 );
102- OGCGeometry .fromGeoJson ("{\" type\" : \" LineString\" , \" coordinates\" : [[2.449,4.865], [7.00000001,8.00000001]]}" ).intersects (g2 );
103-
104- OGCGeometry g3 = OGCGeometry .fromGeoJson ("{\" type\" : \" Polygon\" , \" coordinates\" : [[[1.00000001,1.00000001], [4.00000001,1.00000001], [4.00000001,4.00000001], [1.00000001,4.00000001]]]}" );
105- boolean bb = g2 .equals ((Object )g3 );
106- assertTrue (bb );
100+ OGCGeometry g2 = OGCGeometry .fromGeoJson (
101+ "{\" type\" : \" Polygon\" , \" coordinates\" : [[[1.00000001,1.00000001], [4.00000001,1.00000001], [4.00000001,4.00000001], [1.00000001,4.00000001]]]}" );
102+ OGCGeometry
103+ .fromGeoJson (
104+ "{\" type\" : \" LineString\" , \" coordinates\" : [[1.00000001,1.00000001], [7.00000001,8.00000001]]}" )
105+ .intersects (g2 );
106+ OGCGeometry
107+ .fromGeoJson (
108+ "{\" type\" : \" LineString\" , \" coordinates\" : [[2.449,4.865], [7.00000001,8.00000001]]}" )
109+ .intersects (g2 );
110+
111+ OGCGeometry g3 = OGCGeometry .fromGeoJson (
112+ "{\" type\" : \" Polygon\" , \" coordinates\" : [[[1.00000001,1.00000001], [4.00000001,1.00000001], [4.00000001,4.00000001], [1.00000001,4.00000001]]]}" );
113+ boolean bb = g2 .equals ((Object ) g3 );
114+ assertTrue (bb );
107115 }
108116 }
109117
0 commit comments