/** * Creates CountsGEHCurveGraphs for each link and puts them in the kmz as pngs */ private void createCountsGEHCurveGraphs() { CountsGEHCurveGraphCreator cgc = new CountsGEHCurveGraphCreator(""); List<CountsGraph> graphs = cgc.createGraphs(this.countComparisonFilter.getCountsForHour(null), this.iterationNumber); this.countsGEHCurveGraphMap = new HashMap<>(graphs.size()); String linkId; StringBuffer filename; for (CountsGraph cg : graphs) { try { filename = new StringBuffer(); linkId = ((CountsGEHCurveGraph) cg).getLinkId(); filename.append(linkId); filename.append("_GEH"); filename.append(PNG); writeChartToKmz(filename.toString(), cg.getChart()); this.countsGEHCurveGraphMap.put(linkId, filename.toString()); } catch (IOException e) { e.printStackTrace(); } } }
/** * Creates CountsLoadCurveGraphs for each link and puts them in the kmz as pngs */ private void createCountsLoadCurveGraphs() { CountsLoadCurveGraphCreator cgc = new CountsLoadCurveGraphCreator(""); List<CountsGraph> graphs = cgc.createGraphs(this.countComparisonFilter.getCountsForHour(null), this.iterationNumber); this.countsLoadCurveGraphMap = new HashMap<>(graphs.size()); String linkid; StringBuffer filename; for (CountsGraph cg : graphs) { try { filename = new StringBuffer(); linkid = ((CountsLoadCurveGraph) cg).getLinkId(); filename.append(linkid); filename.append(PNG); writeChartToKmz(filename.toString(), cg.getChart()); this.countsLoadCurveGraphMap.put(linkid, filename.toString()); } catch (IOException e) { e.printStackTrace(); } } }
File file2; if (!indexFile){ chart=cg.getChart(); fileName=cg.getFilename(); file2 = new File(iter_path+"/"+fileName+".html");
/** * Creates the CountsErrorGraph for all the data * @param visible true if initially visible * @return the ScreenOverlay Feature */ private ScreenOverlayType createBoxPlotErrorGraph() { CountsGraph ep; try { ep = new BoxPlotErrorGraph(this.countComparisonFilter.getCountsForHour(null), this.iterationNumber, null, "error graph"); ep.createChart(0); } catch (IllegalArgumentException e) { log.error("Could not create BoxPlot-ErrorGraph.", e); return null; } String filename = "errorGraphBoxPlot.png"; try { writeChartToKmz(filename, ep.getChart()); return createOverlayBottomRight(filename, "Error Graph [Box-Plot]"); } catch (IOException e) { e.printStackTrace(); } return null; }
/** * Creates the CountsErrorGraph for all the data * @param visible true if initially visible * @return the ScreenOverlay Feature */ private ScreenOverlayType createBoxPlotNormalizedErrorGraph() { CountsGraph ep; try { ep = new BoxPlotNormalizedErrorGraph(this.countComparisonFilter.getCountsForHour(null), this.iterationNumber, null, "error graph"); ep.createChart(0); } catch (IllegalArgumentException e) { log.error("Could not create BoxPlot-NormalizedErrorGraph.", e); return null; } String filename = "errorGraphNormalizedBoxPlot.png"; try { writeChartToKmz(filename, ep.getChart()); return createOverlayBottomRight(filename, "Normalized Error Graph [Box-Plot]"); } catch (IOException e) { e.printStackTrace(); } return null; }
String stopId = ((CountsLoadCurveGraph) cg).getLinkId(), filename = stopId + postfix + PNG; writeChartToKmz(filename, cg.getChart()); switch (type) { case Boarding:
/** * Creates the CountsSimReal24Graph for all the data. AWTV = average weekday traffic volumes. * <br><br> * Notes:<ul> * <li> I think that "weekday" means "day-of-week", i.e. the method does not care when it is sunday. kai, sep'16 * </ul> * @param visible true if initially visible * @return the ScreenOverlay Feature */ private ScreenOverlayType createAWTVGraph() { CountsGraph awtv = new CountsSimReal24Graph(this.countComparisonFilter.getCountsForHour(null), this.iterationNumber, "awtv graph"); awtv.createChart(0); String filename = "awtv.png"; try { writeChartToKmz(filename, awtv.getChart()); return createOverlayBottomRight("./" + filename, "AWTV"); } catch (IOException e) { e.printStackTrace(); } return null; }