public List<KrigingPoint> calcInterpolationPoints(){
  double north, south, east, west;
  int nrows, ncols;
  double northing, easting;
  west=bMinX - 0.5 * resolution;
  north=bMaxY + 0.5 * resolution;
  nrows=(int)(Math.ceil((north - bMinY) / resolution));
  ncols=(int)(Math.ceil((bMaxX - west) / resolution));
  south=north - nrows * resolution;
  east=west + ncols * resolution;
  int row, col;
  List<KrigingPoint> pnts=new ArrayList();
  double halfResolution=resolution / 2;
  for (row=0; row < nrows; row++) {
    for (col=0; col < ncols; col++) {
      easting=(col * resolution) + (west + halfResolution);
      northing=(north - halfResolution) - (row * resolution);
      pnts.add(new KrigingPoint(easting,northing,0.0));
    }
  }
  return pnts;
}

public List < KrigingPoint > calcInterpolationPoints ( ) { double north , south , east , west ; int nrows , ncols ; double northing , easting ; west = bMinX - 0.5 * resolution ; north = bMaxY + 0.5 * resolution ; nrows = ( int ) ( Math . ceil ( ( north - bMinY ) / resolution ) ) ; ncols = ( int ) ( Math . ceil ( ( bMaxX - west ) / resolution ) ) ; south = north - nrows * resolution ; east = west + ncols * resolution ; int row , col ; List < KrigingPoint > pnts = new ArrayList ( ) ; double halfResolution = resolution / 2 ; for ( row = 0 ; row < nrows ; row ++ ) { for ( col = 0 ; col < ncols ; col ++ ) { easting = ( col * resolution ) + ( west + halfResolution ) ; northing = ( north - halfResolution ) - ( row * resolution ) ; pnts . add ( new KrigingPoint ( easting , northing , 0.0 ) ) ; } } return pnts ; }
it calculates the location of each grid cell . the resolution should be set before calling this method
