public static Polygon makePolygon ( Geometry shell , Geometry ... holes ) throws IllegalArgumentException { if ( shell == null ) { return null ; } LinearRing outerLine = checkLineString ( shell ) ; LinearRing [ ] interiorlinestrings = new LinearRing [ holes . length ] ; for ( int i = 0 ; i < holes . length ; i ++ ) { interiorlinestrings [ i ] = checkLineString ( holes [ i ] ) ; } return shell . getFactory ( ) . createPolygon ( outerLine , interiorlinestrings ) ; }
Creates a Polygon formed by the given shell and holes .