コード例 #1
0
 public void testNormalizePolygon1() throws Exception {
   Polygon actualValue =
       (Polygon)
           this.geometryFactory.geometry(
               "POLYGON((120 320,240 200,120 80,20 200,120 320),(60 200,80 220,80 200,60 200),(160 200,180 200,180 220,160 200),(120 140,140 140,140 160,120 140),(140 240,140 220,120 260,140 240))");
   actualValue = actualValue.normalize();
   final Polygon expectedValue =
       (Polygon)
           this.geometryFactory.geometry(
               "POLYGON((20 200,120 320,240 200,120 80,20 200),(60 200,80 200,80 220,60 200),(120 140,140 140,140 160,120 140),(120 260,140 220,140 240,120 260),(160 200,180 200,180 220,160 200))");
   assertEqualsExact(expectedValue, actualValue);
 }
コード例 #2
0
 public void testNormalizeEmptyPolygon() throws Exception {
   Polygon actualValue = (Polygon) this.geometryFactory.geometry("POLYGON EMPTY");
   actualValue = actualValue.normalize();
   final Polygon expectedValue = (Polygon) this.geometryFactory.geometry("POLYGON EMPTY");
   assertEqualsExact(expectedValue, actualValue);
 }