public static void main(String[] args){
  java.net.URL input100=ClassLoader.getSystemResource(filename_data100 + ".txt");
  java.net.URL input200=ClassLoader.getSystemResource(filename_data200 + ".txt");
  log.info("Reading data...");
  sg100=SpatialGrid.readFromFile(input100.getFile());
  sg200=SpatialGrid.readFromFile(input200.getFile());
  try {
    out=new FileWriter(outputFile);
    out.write("interpolation method \t\t\t\t interp. time \t sum of abs. differences \t rel. difference \n");
    out.write("-----------------------------------------------------------------------------------------\n");
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  log.info("Start interpolation of file " + filename_data200 + " with the different interpolation methods:");
  testOneMethod(Interpolation.BILINEAR,Double.NaN);
  testOneMethod(Interpolation.BICUBIC,Double.NaN);
  for (int e=1; e <= 12; e++) {
    testOneMethod(Interpolation.INVERSE_DISTANCE_WEIGHTING,e);
  }
  try {
    out.write("\nRemark: The interpolation difference is calculated to known data at the same resolution.\n");
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  log.info("interpolation test done");
}

public static void main ( String [ ] args ) { java . net . URL input100 = ClassLoader . getSystemResource ( filename_data100 + ".txt" ) ; java . net . URL input200 = ClassLoader . getSystemResource ( filename_data200 + ".txt" ) ; log . info ( "Reading data..." ) ; sg100 = SpatialGrid . readFromFile ( input100 . getFile ( ) ) ; sg200 = SpatialGrid . readFromFile ( input200 . getFile ( ) ) ; try { out = new FileWriter ( outputFile ) ; out . write ( "interpolation method \t\t\t\t interp. time \t sum of abs. differences \t rel. difference \n" ) ; out . write ( "-----------------------------------------------------------------------------------------\n" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } log . info ( "Start interpolation of file " + filename_data200 + " with the different interpolation methods:" ) ; testOneMethod ( Interpolation . BILINEAR , Double . NaN ) ; testOneMethod ( Interpolation . BICUBIC , Double . NaN ) ; for ( int e = 1 ; e <= 12 ; e ++ ) { testOneMethod ( Interpolation . INVERSE_DISTANCE_WEIGHTING , e ) ; } try { out . write ( "\nRemark: The interpolation difference is calculated to known data at the same resolution.\n" ) ; out . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } log . info ( "interpolation test done" ) ; }
reads the data from the scenario and interpolates the grid of known values to a higher resolution first with bilinear interpolation second with bicubic spline interpolation
