annotate flys-backend/src/main/java/de/intevation/flys/importer/parsers/DA66Parser.java @ 4712:70842db72ee4

Include improved DA66Parser into importer.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 19 Dec 2012 14:04:12 +0100
parents aa718770308e
children 2f7a509f5acf
rev   line source
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.importer.parsers;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 import java.util.ArrayList;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4 import java.util.HashMap;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 import java.util.Map;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6 import java.util.List;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 import java.util.TreeMap;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9 import java.util.regex.Pattern;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10 import java.util.regex.Matcher;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 import java.io.File;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13 import java.io.IOException;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 import org.apache.log4j.Logger;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import de.intevation.flys.importer.XY;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19 import de.intevation.artifacts.common.utils.FileTools;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22 /**
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23 * To create cross-sections, generate: Map<double,list<xy>> from files
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24 * in da66 format.
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25 */
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26 public class DA66Parser extends LineParser
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
28 /** Private logger. */
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29 private static Logger logger = Logger.getLogger(DA66Parser.class);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
31 private static String HEAD_HEAD = "00";
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
32 private static String HEAD_GEOM = "66"; // "Values"
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
33 private static String HEAD_ENDG = "88"; // Probably never used.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
34
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
35 private static final Pattern LINE_PATTERN =
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
36 Pattern.compile("^([0-9 -]{2})" + // Type (00|66|88)
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 "([0-9 -]{5})" + // unset
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 "([0-9 -]{2})" + // id
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39 "([0-9 -]{9})" + // station
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 "([0-9 -]{2})" + // running number
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
41 "([0-9 -]{1})?" + // point id
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 /*
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 Would be great if we could express the pattern as this:
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44 ([0-9 -]{1})([0-9 -JKMLMNOPQR]{7})([0-9 -]{7})+
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 */
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
46 "([0-9 -JKMLMNOPQR]{7})?" + // y
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
47 "([0-9 -]{7})?" + // z
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
48 "([0-9 -]{1})?" + // point id
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
49 "([0-9 -JKMLMNOPQR]{7})?" + // y
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
50 "([0-9 -]{7})?" + // z
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
51 "([0-9 -]{1})?" + // point id
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
52 "([0-9 -JKMLMNOPQR]{7})?" + // y
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
53 "([0-9 -]{7})?" + // z
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
54 "([0-9 -]{1})?" + // point id
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
55 "([0-9 -JKMLMNOPQR]{7})?" + // y
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
56 "([0-9 -]{7})?" // z
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 );
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58 //Pattern.compile("^([0-9 -]{2})");
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
60 /** Indices to match group of main regex. */
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
61 private static enum FIELD {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
62 HEAD ( 1),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
63 UNSET ( 2),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
64 ID ( 3),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
65 STATION ( 4),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
66 RUNNR ( 5),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
67 POINT_1_ID( 6),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
68 POINT_1_Y ( 7),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
69 POINT_1_Z ( 8),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
70 POINT_2_ID( 9),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
71 POINT_2_Y (10),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
72 POINT_2_Z (11),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
73 POINT_3_ID(12),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
74 POINT_3_Y (13),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
75 POINT_3_Z (14),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
76 POINT_4_ID(15),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
77 POINT_4_Y (16),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
78 POINT_4_Z (17);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
79
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
80 private int idx;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
81 FIELD(int idx) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
82 this.idx = idx;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
83 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
84 int getIdx() {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
85 return idx;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
86 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
87 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
88
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
89 /** Header lines of da66 can define a type. */
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
90 private static enum Type {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
91 DATE ( 0),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
92 HEKTOSTONE_LEFT ( 1), //grm. "Standlinie"
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
93 HEKTOSTONE_RIGHT ( 2),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
94 CHANNEL_LEFT ( 3), //grm. "Fahrrinne"
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
95 CHANNEL_RIGHT ( 4),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
96 CHANNEL_2_LEFT ( 5),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
97 CHANNEL_2_RIGHT ( 6),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
98 GIW_1972 ( 7),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
99 GROIN_DIST_LEFT ( 8), //grm. "Buhnenkopfabstand links"
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
100 GROIN_HEIGHT_LEFT ( 9),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
101 GROIN_SLOPE_LEFT (10),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
102 GROIN_DIST_RIGHT (11),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
103 GROIN_HEIGHT_RIGHT (12),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
104 GROIN_SLOPE_RIGHT (13),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
105 STRIKE_LEFT (14), //grm. "Streichlinie links"
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
106 AXIS (15),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
107 STRIKE_RIGHT (16),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
108 GROIN_BACK_SLOPE_LEFT (17), //grm. "Buhnenrueckenneigung"
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
109 GROIN_BACK_SLOPE_RIGHT (18),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
110 GIW_1932 (19),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
111 GIW_1982 (20),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112 STAND_ISLAND_1 (21),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113 STAND_ISLAND_2 (22),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
114 STAND_ISLAND_3 (23),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
115 STAND_ISLAND_4 (24),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
116 UNSPECIFIED_1 (25),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
117 UNSPECIFIED_2 (26),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
118 HHW (27),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
119 OLD_PROFILE_NULL (28),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
120 AW_1978 (29),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121 SIGN_LEFT (30),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122 SIGN_RIGHT (31),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
123 DIST_SIGNAL_CHANNEL_LEFT (32),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124 DIST_SIGNAL_CHANNEL_RIGHT(33),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
125 UNSPECIFIED_3 (34),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
126 UNSPECIFIED_4 (35),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
127 UNSPECIFIED_5 (36),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
128 UNSPECIFIED_6 (37),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
129 SHORE_LEFT (38),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
130 SHORE_RIGHT (39),
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
131 UNSPECIFIED_7 (40);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
132
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
133 private final int id;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 Type(int id) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
135 this.id = id;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
136 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
137 public int getId() {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
138 return id;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
139 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
140 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
141
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
142 /** Available types. */
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
143 private static HashMap<Integer, Type> typeMap;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
144
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
145 /** Types we can deal with. */
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
146 private static List<Type> implementedTypes;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
147
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
148 static {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
149 typeMap = new HashMap<Integer, Type>();
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
150 for (Type t: Type.values()) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
151 typeMap.put(new Integer(t.getId()), t);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
152 }
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
153 // TODO populate and respect header type.
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
154 implementedTypes = new ArrayList<Type>();
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
155 //implementedTypes.add(..);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
156 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
157
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
158
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
159 /** The current line to which add points. */
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
160 private List<XY> currentLine;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
161
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
162
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
163 // TODO refactor, its shared with PRFParser.
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
164 public interface Callback {
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
165 boolean da66Accept(File file);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
166 void da66Parsed(DA66Parser parser);
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
167 } // interface Parser
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
168
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
169
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
170 /** Data collected so far, last element will be currentLine. */
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
171 protected Map<Double, List<XY>> data;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
172
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
173
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
174 public DA66Parser() {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
175 data = new TreeMap<Double, List<XY>>();
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
176 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
177
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
178 public Map<Double, List<XY>> getData() {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
179 return data;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
180 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
181
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
182 public void setData(Map<Double, List<XY>> data) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
183 this.data = data;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
184 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
185
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
186 private static final String removeExtension(String name) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
187 int index = name.lastIndexOf('.');
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
188 return index == -1
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
189 ? name
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
190 : name.substring(0, index);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
191 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
192
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
193 public void parseDA66s(File root, final Callback callback) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
194
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
195 // TODO use the removeExtension/guess description and date.
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
196 FileTools.walkTree(root, new FileTools.FileVisitor() {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
197 @Override
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
198 public boolean visit(File file) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
199 if (file.isFile() && file.canRead()
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
200 && file.getName().toLowerCase().endsWith(".d66")
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
201 && (callback == null || callback.da66Accept(file))) {
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
202 reset();
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
203 try {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
204 parse(file);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
205 logger.info("parsing done");
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
206 if (callback != null) {
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
207 callback.da66Parsed(DA66Parser.this);
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
208 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
209 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
210 catch (IOException ioe) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
211 logger.error("IOException while parsing file");
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
212 return false;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
213 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
214 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
215 return true;
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
216 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
217 });
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
218 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
219
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
220
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
221 /**
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
222 * Get the Index of the last cross-section lines point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
223 * @return last points index, -1 if not available.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
224 */
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
225 private int lastPointIdx() {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
226 if (currentLine == null || currentLine.isEmpty()) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
227 return -1;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
228 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
229 XY lastPoint = this.currentLine.get(currentLine.size()-1);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
230 return lastPoint.getIndex();
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
231 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
232
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
233
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
234 /**
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
235 * Add a Point (YZ,Index) to the current cross section line.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
236 * @param y The y coordinate of new point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
237 * @param z The z coordinate of new point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
238 * @param idx Ignored, the parameter of new point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
239 * @return true if point could been added, false otherwise (e.g. not
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
240 * parsable y or z values.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
241 */
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
242 private boolean addPoint(String y, String z, String idx) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
243 if (z == null || y == null || idx == null) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
244 logger.error("Incomplete point definition");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
245 return false;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
246 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
247
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
248 Double iy;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
249 Double iz;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
250 try {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
251 iy = Double.parseDouble(y);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
252 iz = Double.parseDouble(z);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
253 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
254 catch(java.lang.NumberFormatException nfe) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
255 logger.error("Could not parse Number: " + nfe.getMessage());
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
256 return false;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
257 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
258
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
259 // We ignore idx, and increment instead.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
260 Integer index;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
261 int lastPointIdx = lastPointIdx();
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
262 if (lastPointIdx <= 0) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
263 index = 1;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
264 } else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
265 index = lastPointIdx + 1;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
266 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
267
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
268 currentLine.add(new XY(iy, iz, index));
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
269 return true;
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
270 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
271
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
272
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
273 /** Called before consuming first line of file. */
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
274 public void reset() {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
275 data.clear();
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
276 currentLine = new ArrayList<XY>();
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
277 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
278
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
279
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
280 /**
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
281 * Called for each line. Try to extract info from a da66 line.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
282 */
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
283 @Override
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
284 protected void handleLine(int lineNum, String line) {
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
285 String head = line.substring(0,2);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
286 if (HEAD_HEAD.equals(head)) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
287 logger.debug("Hit a 00");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
288 Matcher m = LINE_PATTERN.matcher(line);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
289 if (m.find()) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
290 // Actually matches!
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
291 currentLine = new ArrayList<XY>();
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
292 data.put(Double.parseDouble(m.group(FIELD.STATION.getIdx())),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
293 currentLine);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
294 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
295 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
296 logger.error("HEAD line bad.");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
297 }
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
298 }
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
299 else if (HEAD_GEOM.equals(head)) {
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
300 Matcher m = LINE_PATTERN.matcher(line);
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
301 if (m.find()) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
302 //logger.info("Station: " + m.group(FIELD.STATION.getIdx()));
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
303 // TODO if last station differs, error and abort
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
304 if (m.group(FIELD.POINT_1_ID.getIdx()) != null) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
305 // Point 1
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
306 if(addPoint(
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
307 m.group(FIELD.POINT_1_Y.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
308 m.group(FIELD.POINT_1_Z.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
309 m.group(FIELD.POINT_1_ID.getIdx()))) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
310 // Point added.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
311 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
312 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
313 // Problematic point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
314 logger.error("A point could not be added");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
315 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
316 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
317 if (m.group(FIELD.POINT_2_ID.getIdx()) != null) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
318 // Point 2
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
319 if(addPoint(
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
320 m.group(FIELD.POINT_2_Y.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
321 m.group(FIELD.POINT_2_Z.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
322 m.group(FIELD.POINT_2_ID.getIdx()))) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
323 // Point added.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
324 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
325 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
326 // Problematic point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
327 logger.error("A point could not be added");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
328 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
329 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
330 if (m.group(FIELD.POINT_3_ID.getIdx()) != null) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
331 // Point 3
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
332 if(addPoint(
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
333 m.group(FIELD.POINT_3_Y.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
334 m.group(FIELD.POINT_3_Z.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
335 m.group(FIELD.POINT_3_ID.getIdx()))) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
336 // Point added.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
337 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
338 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
339 // Problematic point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
340 logger.error("A point could not be added");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
341 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
342 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
343 if (m.group(FIELD.POINT_4_ID.getIdx()) != null) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
344 // Point 4
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
345 if(addPoint(
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
346 m.group(FIELD.POINT_4_Y.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
347 m.group(FIELD.POINT_4_Z.getIdx()),
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
348 m.group(FIELD.POINT_4_ID.getIdx()))) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
349 // Point added.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
350 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
351 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
352 // Problematic point.
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
353 logger.error("A point could not be added");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
354 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
355 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
356 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
357 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
358 logger.warn("Line could not be parsed: ");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
359 logger.warn(line);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
360 }
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
361 }
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
362 else if (HEAD_GEOM.equals(head)) {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
363 logger.debug("Hit a 88");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
364 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
365 else {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
366 logger.error("Do not know how to treat da66 line:");
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
367 logger.error(line);
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
368 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
369 }
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
370
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
371
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
372 /** Called when file is fully consumed. */
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
373 @Override
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
374 protected void finish() {
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
375 logger.info("Parsed " + data.size() + " lines");
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
376 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
377
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
378
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
379 /** Parses files given as arguments. */
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
380 public static void main(String [] args) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
381
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
382 DA66Parser parser = new DA66Parser();
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
383
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
384 logger.warn("Start Parsing files.");
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
385 for (String arg: args) {
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
386 parser.parseDA66s(new File(arg), null);
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
387 logger.warn("Parsing a file.");
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
388 }
4712
70842db72ee4 Include improved DA66Parser into importer.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4681
diff changeset
389 logger.error("Finished Parsing files.");
4681
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
390 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
391 }
aa718770308e Less than sceleton for DA66-CrossSection parser added.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
392 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org