public void writeCountsComparisonList(final String filename,final String format){
  if (format.compareToIgnoreCase("kml") == 0) {
    CountSimComparisonKMLWriter kmlWriter=new CountSimComparisonKMLWriter(countsComparisonList,this.network,TransformationFactory.getCoordinateTransformation(this.coordinateSystem,TransformationFactory.WGS84));
    kmlWriter.writeFile(filename);
  }
 else   if (format.compareToIgnoreCase("txt") == 0) {
    CountSimComparisonTableWriter writer=new CountSimComparisonTableWriter(countsComparisonList,Locale.US);
    writer.writeFile(filename);
  }
 else {
    throw new IllegalArgumentException("Output format must be txt or kml");
  }
  ComparisonErrorStatsCalculator errorStats=new ComparisonErrorStatsCalculator(countsComparisonList);
  double[] hours=new double[24];
  for (int i=1; i < 25; i++) {
    hours[i - 1]=i;
  }
  DoubleArrayTableWriter tableWriter=new DoubleArrayTableWriter();
  tableWriter.addColumn(hours);
  tableWriter.addColumn(errorStats.getMeanRelError());
  tableWriter.writeFile(filename + "errortable.txt");
}

public void writeCountsComparisonList ( final String filename , final String format ) { if ( format . compareToIgnoreCase ( "kml" ) == 0 ) { CountSimComparisonKMLWriter kmlWriter = new CountSimComparisonKMLWriter ( countsComparisonList , this . network , TransformationFactory . getCoordinateTransformation ( this . coordinateSystem , TransformationFactory . WGS84 ) ) ; kmlWriter . writeFile ( filename ) ; } else if ( format . compareToIgnoreCase ( "txt" ) == 0 ) { CountSimComparisonTableWriter writer = new CountSimComparisonTableWriter ( countsComparisonList , Locale . US ) ; writer . writeFile ( filename ) ; } else { throw new IllegalArgumentException ( "Output format must be txt or kml" ) ; } ComparisonErrorStatsCalculator errorStats = new ComparisonErrorStatsCalculator ( countsComparisonList ) ; double [ ] hours = new double [ 24 ] ; for ( int i = 1 ; i < 25 ; i ++ ) { hours [ i - 1 ] = i ; } DoubleArrayTableWriter tableWriter = new DoubleArrayTableWriter ( ) ; tableWriter . addColumn ( hours ) ; tableWriter . addColumn ( errorStats . getMeanRelError ( ) ) ; tableWriter . writeFile ( filename + "errortable.txt" ) ; }
writes the results of the comparison to a file
