Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java @ 4751:ee6c0f246b28
W80Parser: Added TODO/comment.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 03 Jan 2013 10:21:46 +0100 |
parents | 60398ab6129a |
children | ba8c2147b4ff |
comparison
equal
deleted
inserted
replaced
4750:60398ab6129a | 4751:ee6c0f246b28 |
---|---|
166 // Calculate distance between this and anchor-point. | 166 // Calculate distance between this and anchor-point. |
167 double dx = gkr - anchor.getCoordinate().getX(); | 167 double dx = gkr - anchor.getCoordinate().getX(); |
168 double dy = gkh - anchor.getCoordinate().getY(); | 168 double dy = gkh - anchor.getCoordinate().getY(); |
169 double d = Math.sqrt(dx * dx + dy * dy); | 169 double d = Math.sqrt(dx * dx + dy * dy); |
170 | 170 |
171 // TODO: Scale to have "x==0" e.g. at axis of river. | |
172 // TODO: Handle "not straight lines." | |
173 | |
171 // We ignore idx, and increment instead. | 174 // We ignore idx, and increment instead. |
172 int index; | 175 int index; |
173 int lastPointIdx = lastPointIdx(); | 176 int lastPointIdx = lastPointIdx(); |
174 if (lastPointIdx <= 0) { | 177 if (lastPointIdx <= 0) { |
175 index = 1; | 178 index = 1; |
187 */ | 190 */ |
188 @Override | 191 @Override |
189 protected void handleLine(int lineNum, String line) { | 192 protected void handleLine(int lineNum, String line) { |
190 String pointId = line.substring(0,20); | 193 String pointId = line.substring(0,20); |
191 String station = line.substring(9,16); | 194 String station = line.substring(9,16); |
195 // TODO: There is 'station' and a 'shore'-code behind. | |
196 // 1 = left, 2 = right. none = middle | |
192 String pointIndex = line.substring(16,21); | 197 String pointIndex = line.substring(16,21); |
193 // For GK, first seven digits are of interest. | 198 // For GK, first seven digits are of interest. |
194 String gkRight = line.substring(20,30); | 199 String gkRight = line.substring(20,30); |
195 String gkHigh = line.substring(30,40); | 200 String gkHigh = line.substring(30,40); |
196 String date = line.substring(40,46); | 201 String date = line.substring(40,46); |