public SnapshotWriter get() { String baseFileName = "googleearth.kmz"; String fileName = controlerIO.getIterationFilename(iteration, baseFileName); String coordSystem = scenario.getConfig().global().getCoordinateSystem(); return new KmlSnapshotWriter(fileName, TransformationFactory.getCoordinateTransformation(coordSystem, TransformationFactory.WGS84)); }
StyleType carStyle = createColoredCarStyle(iconLink, MatsimKmlStyleFactory.MATSIMRED, "redCarStyle"); carStyles.put( carStyle.getId(), carStyle ) ; StyleType carStyle = createColoredCarStyle(iconLink, MatsimKmlStyleFactory.MATSIMYELLOW, "yellowCarStyle"); carStyles.put( carStyle.getId(), carStyle ) ; StyleType carStyle = createColoredCarStyle(iconLink, MatsimKmlStyleFactory.MATSIMGREEN, "greenCarStyle"); carStyles.put( carStyle.getId(), carStyle ) ;
private void loadSnapshotWriters(final String outputDir) { if (this.writer != null) { this.visualizer.addSnapshotWriter(this.writer); } Collection<String> snapshotFormat = this.config.controler().getSnapshotFormat(); if (snapshotFormat.contains("transims")) { String snapshotFile = outputDir + "T.veh"; this.visualizer.addSnapshotWriter(new TransimsSnapshotWriter(snapshotFile)); } if (snapshotFormat.contains("googleearth")) { String snapshotFile = outputDir + "googleearth.kmz"; String coordSystem = this.config.global().getCoordinateSystem(); this.visualizer.addSnapshotWriter(new KmlSnapshotWriter(snapshotFile, TransformationFactory.getCoordinateTransformation(coordSystem, TransformationFactory.WGS84))); } }