Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshCrossOutputState.java @ 528:44415ae01ddb
Fixed issue gnv/issue159
gnv-artifacts/trunk@624 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 25 Jan 2010 18:25:19 +0000 |
parents | 4e347624ee7c |
children | 9a828e5a2390 |
comparison
equal
deleted
inserted
replaced
527:f598702b2a10 | 528:44415ae01ddb |
---|---|
1 /** | |
2 * | |
3 */ | |
4 package de.intevation.gnv.state.profile.horizontal; | 1 package de.intevation.gnv.state.profile.horizontal; |
5 | 2 |
6 import com.vividsolutions.jts.geom.Coordinate; | 3 import com.vividsolutions.jts.geom.Coordinate; |
7 | 4 |
8 import de.intevation.artifactdatabase.Config; | 5 import de.intevation.artifactdatabase.Config; |
52 /** | 49 /** |
53 * @author Tim Englich (tim.englich@intevation.de) | 50 * @author Tim Englich (tim.englich@intevation.de) |
54 * @author Ingo Weinzierl (iweinzierl@intevation.de) | 51 * @author Ingo Weinzierl (iweinzierl@intevation.de) |
55 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) | 52 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) |
56 */ | 53 */ |
57 public class HorizontalProfileMeshCrossOutputState extends | 54 public class HorizontalProfileMeshCrossOutputState |
58 HorizontalProfileOutputState { | 55 extends HorizontalProfileOutputState |
59 | 56 { |
60 /** | 57 |
61 * | 58 public static final boolean USE_INDEX_BUFFER = |
62 */ | 59 Boolean.getBoolean("gnv.horizontal.profile.mesh.cross.index.buffer"); |
60 | |
63 private static final long serialVersionUID = 2205958041745637263L; | 61 private static final long serialVersionUID = 2205958041745637263L; |
64 | 62 |
65 /** | 63 /** |
66 * the logger, used to log exceptions and additonaly information | 64 * the logger, used to log exceptions and additonaly information |
67 */ | 65 */ |
68 private static Logger log = | 66 private static Logger log = Logger.getLogger( |
69 Logger.getLogger(HorizontalProfileMeshCrossOutputState.class); | 67 HorizontalProfileMeshCrossOutputState.class); |
70 | |
71 | 68 |
72 private String ijkQueryID = null; | 69 private String ijkQueryID = null; |
73 | 70 |
74 /** | 71 /** |
75 * Constructor | 72 * Constructor |
176 if (coords == null) { | 173 if (coords == null) { |
177 throw new IllegalStateException("cannot read coordinates"); | 174 throw new IllegalStateException("cannot read coordinates"); |
178 } | 175 } |
179 | 176 |
180 try { | 177 try { |
181 String additionWhere = | 178 String additionWhere = USE_INDEX_BUFFER |
182 WKTUtils.worldCoordinatesToIndex( | 179 ? WKTUtils.worldCoordinatesToIndex( |
183 coords, | 180 coords, |
184 result, | 181 result, |
185 meshId.getValue(), | 182 meshId.getValue(), |
186 ijkQueryID); | 183 ijkQueryID) |
184 : WKTUtils.TRUE_EXPRESSION; | |
187 | 185 |
188 String[] addedFilterValues = StringUtils.append( | 186 String[] addedFilterValues = StringUtils.append( |
189 generateFilterValuesFromInputData(), | 187 generateFilterValuesFromInputData(), |
190 additionWhere); | 188 additionWhere); |
191 | 189 |