MATSIM
counts
CountsWriter.java
Go to the documentation of this file.
1
/* *********************************************************************** *
2
* project: org.matsim.*
3
* CountsWriter.java
4
* *
5
* *********************************************************************** *
6
* *
7
* copyright : (C) 2007 by the members listed in the COPYING, *
8
* LICENSE and WARRANTY file. *
9
* email : info at matsim dot org *
10
* *
11
* *********************************************************************** *
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* See also COPYING, LICENSE and WARRANTY file *
18
* *
19
* *********************************************************************** */
20
21
package
org.matsim.counts;
22
23
import
org
.
matsim
.
core
.
api
.
internal
.
MatsimWriter
;
24
import
org
.
matsim
.
core
.
utils
.
geometry
.
CoordinateTransformation
;
25
import
org
.
matsim
.
core
.
utils
.
geometry
.
transformations
.
IdentityTransformation
;
26
import
org
.
matsim
.
core
.
utils
.
io
.
MatsimXmlWriter
;
27
28
import
java.io.IOException;
29
34
public
class
CountsWriter
extends
MatsimXmlWriter
implements
MatsimWriter
{
35
36
private
final
CoordinateTransformation
ct
;
37
private
final
Counts
counts
;
38
39
public
CountsWriter
(
final
Counts
counts) {
40
this
(
new
IdentityTransformation
(),
counts
);
41
}
42
43
public
CountsWriter
(
44
final
CoordinateTransformation
ct,
45
final
Counts
counts) {
46
this.ct =
ct
;
47
this.counts =
counts
;
48
}
49
50
@Override
51
public
final
void
write
(
final
String filename) {
52
try
{
53
if
(System.getProperty(
"MATSIM_COUNTS_VERSION"
,
""
).equalsIgnoreCase(
"1"
))
54
new
CountsWriterV1(ct, counts).write(filename);
55
else
56
new
CountsWriterV2(ct, counts).write(filename);
57
}
catch
(IOException e) {
58
throw
new
RuntimeException
(e);
59
}
60
}
61
62
@Override
63
public
final
String
toString
() {
64
return
super.toString();
65
}
66
}
org.matsim.counts.CountsWriter.CountsWriter
CountsWriter(final CoordinateTransformation ct, final Counts counts)
Definition:
CountsWriter.java:43
org.matsim.counts.CountsWriter.toString
final String toString()
Definition:
CountsWriter.java:63
org.matsim.counts.Counts
Definition:
Counts.java:21
org.matsim.core.utils.geometry.transformations.IdentityTransformation
Definition:
IdentityTransformation.java:32
org.matsim.core.api.internal.MatsimWriter
Definition:
MatsimWriter.java:25
org
org.matsim.core.utils
org.matsim.counts.CountsWriter.counts
final Counts counts
Definition:
CountsWriter.java:37
RuntimeException
org.matsim.core.api.internal
Definition:
MatsimComparator.java:21
org.matsim.core.utils.geometry.transformations
Definition:
AtlantisToWGS84.java:21
org.matsim.core.utils.geometry.CoordinateTransformation
Definition:
CoordinateTransformation.java:32
org.matsim.core.utils.io.MatsimXmlWriter
Definition:
MatsimXmlWriter.java:38
org.matsim.core
org.matsim.counts.CountsWriter.write
final void write(final String filename)
Definition:
CountsWriter.java:51
org.matsim.counts.CountsWriter.CountsWriter
CountsWriter(final Counts counts)
Definition:
CountsWriter.java:39
org.matsim.counts.CountsWriter.ct
final CoordinateTransformation ct
Definition:
CountsWriter.java:36
org.matsim.core.utils.geometry
Definition:
CoordinateTransformation.java:21
org.matsim.counts.CountsWriter
Definition:
CountsWriter.java:34
org.matsim.core.utils.io
Definition:
AbstractMatsimWriter.java:21
org.matsim.core.api
org.matsim
Generated by
1.8.13