question: Geometry [ ] createRectangles ( Envelope env , int nRect , double rectSize ) { int nSide = 1 + ( int ) Math . sqrt ( ( double ) nRect ) ; double dx = env . getWidth ( ) / nSide ; double dy = env . getHeight ( ) / nSide ; List rectList = new ArrayList ( ) ; for ( int i = 0 ; i < nSide ; i ++ ) { for ( int j = 0 ; j < nSide ; j ++ ) { double baseX = env . getMinX ( ) + i * dx ; double baseY = env . getMinY ( ) + j * dy ; Envelope envRect = new Envelope ( baseX , baseX + dx , baseY , baseY + dy ) ; Geometry rect = fact . toGeometry ( envRect ) ; rectList . add ( rect ) ; } } return GeometryFactory . toGeometryArray ( rectList ) ; }
target:  Creates a set of rectangular Polygons which  cover the given envelope. The rectangles    At least nRect rectangles are created.