public void setGrid ( Rectangle2D bbox , double width , double height ) { offsetX = bbox . getX ( ) ; offsetY = bbox . getY ( ) ; // number of grid cells countX = Math . min ( nx , ( int ) ( bbox . getWidth ( ) / ( scaleOverlap * width ) ) ) ; countY = Math . min ( ny , ( int ) ( bbox . getHeight ( ) / ( scaleOverlap * height ) ) ) ; gridWidth = bbox . getWidth ( ) / countX ; gridHeight = bbox . getHeight ( ) / countY ; if ( debug ) System . out . println ( "SpatialGrid size " + gridWidth + " " + gridHeight + " = " + countX + " by " + countY + " scaleOverlap= " + scaleOverlap ) ; }
Set the grid scale .