public static int [ ] getRegionColsRows ( GridCoverage2D gridCoverage ) { GridGeometry2D gridGeometry = gridCoverage . getGridGeometry ( ) ; GridEnvelope2D gridRange = gridGeometry . getGridRange2D ( ) ; int height = gridRange . height ; int width = gridRange . width ; int [ ] params = new int [ ] { width , height } ; return params ; }
Get the array of rows and cols .