public int gridMagnitudeModel(){
  double pixelSizeModel=toModel(1);
  double pixelSizeModelLog=MathUtil.log10(pixelSizeModel);
  int gridMag=(int)Math.ceil(pixelSizeModelLog);
  double gridSizeModel=Math.pow(10,gridMag);
  double gridSizeView=toView(gridSizeModel);
  if (gridSizeView <= MIN_GRID_RESOLUTION_PIXELS)   gridMag+=1;
  return gridMag;
}

public int gridMagnitudeModel ( ) { double pixelSizeModel = toModel ( 1 ) ; double pixelSizeModelLog = MathUtil . log10 ( pixelSizeModel ) ; int gridMag = ( int ) Math . ceil ( pixelSizeModelLog ) ; double gridSizeModel = Math . pow ( 10 , gridMag ) ; double gridSizeView = toView ( gridSizeModel ) ; if ( gridSizeView <= MIN_GRID_RESOLUTION_PIXELS ) gridMag += 1 ; return gridMag ; }
gets the magnitude ( power of 10 ) for the basic grid size .
