Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java @ 778:9a828e5a2390
Removed trailing whitespace
gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 07:58:51 +0000 |
parents | a6081d76fa1c |
children | c4156275c1e1 |
comparison
equal
deleted
inserted
replaced
777:8009961db1cb | 778:9a828e5a2390 |
---|---|
129 | 129 |
130 @Override | 130 @Override |
131 public void initialize(String uuid, CallContext callContext) | 131 public void initialize(String uuid, CallContext callContext) |
132 throws StateException { | 132 throws StateException { |
133 super.initialize(uuid, callContext); | 133 super.initialize(uuid, callContext); |
134 | 134 |
135 getChartResult(uuid, callContext); | 135 getChartResult(uuid, callContext); |
136 } | 136 } |
137 | 137 |
138 @Override | 138 @Override |
139 protected ChartLabels createChartLabels(Locale locale, String uuid) { | 139 protected ChartLabels createChartLabels(Locale locale, String uuid) { |
267 } | 267 } |
268 return null; | 268 return null; |
269 } | 269 } |
270 | 270 |
271 private static int getGroundInterpolation(CallContext callContext) { | 271 private static int getGroundInterpolation(CallContext callContext) { |
272 GNVArtifactContext context = | 272 GNVArtifactContext context = |
273 (GNVArtifactContext)callContext.globalContext(); | 273 (GNVArtifactContext)callContext.globalContext(); |
274 | 274 |
275 String interpolation = (String)context.get( | 275 String interpolation = (String)context.get( |
276 GNVArtifactContext.VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION_KEY); | 276 GNVArtifactContext.VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION_KEY); |
277 | 277 |
278 return RasterObject.getInterpolationType(interpolation); | 278 return RasterObject.getInterpolationType(interpolation); |
279 } | 279 } |
280 | 280 |
281 private static Dimension getRasterSize(CallContext callContext) { | 281 private static Dimension getRasterSize(CallContext callContext) { |
282 GNVArtifactContext context = | 282 GNVArtifactContext context = |
283 (GNVArtifactContext)callContext.globalContext(); | 283 (GNVArtifactContext)callContext.globalContext(); |
284 Dimension size = (Dimension)context.get( | 284 Dimension size = (Dimension)context.get( |
285 GNVArtifactContext.VERTICAL_CROSS_SECTION_SAMPLES_KEY); | 285 GNVArtifactContext.VERTICAL_CROSS_SECTION_SAMPLES_KEY); |
286 return size != null | 286 return size != null |
287 ? size | 287 ? size |
289 } | 289 } |
290 | 290 |
291 private static List<Filter.Factory> getFilterFactories( | 291 private static List<Filter.Factory> getFilterFactories( |
292 CallContext callContext | 292 CallContext callContext |
293 ) { | 293 ) { |
294 GNVArtifactContext context = | 294 GNVArtifactContext context = |
295 (GNVArtifactContext)callContext.globalContext(); | 295 (GNVArtifactContext)callContext.globalContext(); |
296 List<Filter.Factory> factories = (List<Filter.Factory>)context.get( | 296 List<Filter.Factory> factories = (List<Filter.Factory>)context.get( |
297 GNVArtifactContext.VERTICAL_CROSS_SECTION_FILTER_FACTORIES_KEY); | 297 GNVArtifactContext.VERTICAL_CROSS_SECTION_FILTER_FACTORIES_KEY); |
298 return factories != null | 298 return factories != null |
299 ? factories | 299 ? factories |
301 } | 301 } |
302 | 302 |
303 private static Map<Integer, PaletteManager> getPalettes( | 303 private static Map<Integer, PaletteManager> getPalettes( |
304 CallContext callContext | 304 CallContext callContext |
305 ) { | 305 ) { |
306 GNVArtifactContext context = | 306 GNVArtifactContext context = |
307 (GNVArtifactContext)callContext.globalContext(); | 307 (GNVArtifactContext)callContext.globalContext(); |
308 Map<Integer, PaletteManager> palettes = | 308 Map<Integer, PaletteManager> palettes = |
309 (Map<Integer, PaletteManager>)context.get( | 309 (Map<Integer, PaletteManager>)context.get( |
310 GNVArtifactContext.PALETTES_KEY); | 310 GNVArtifactContext.PALETTES_KEY); |
311 return palettes != null | 311 return palettes != null |
312 ? palettes | 312 ? palettes |
313 : new HashMap<Integer, PaletteManager>(); | 313 : new HashMap<Integer, PaletteManager>(); |
314 } | 314 } |
315 | 315 |
316 private static Paint getGroundFill(CallContext callContext) { | 316 private static Paint getGroundFill(CallContext callContext) { |
317 GNVArtifactContext context = | 317 GNVArtifactContext context = |
318 (GNVArtifactContext)callContext.globalContext(); | 318 (GNVArtifactContext)callContext.globalContext(); |
319 Paint fill = (Paint)context.get( | 319 Paint fill = (Paint)context.get( |
320 GNVArtifactContext.VERTICAL_CROSS_SECTION_GROUND_FILL_KEY); | 320 GNVArtifactContext.VERTICAL_CROSS_SECTION_GROUND_FILL_KEY); |
321 return fill != null | 321 return fill != null |
322 ? fill | 322 ? fill |
458 | 458 |
459 numRegions = new Vectorizer(false, intRaster, rasterSize.width) | 459 numRegions = new Vectorizer(false, intRaster, rasterSize.width) |
460 .process(ipsp); | 460 .process(ipsp); |
461 | 461 |
462 IsoAttributeGenerator iag = new IsoAttributeGenerator(isoPalette); | 462 IsoAttributeGenerator iag = new IsoAttributeGenerator(isoPalette); |
463 Collection<PolygonSeries> ps = ipsp.getSeries(iag); | 463 Collection<PolygonSeries> ps = ipsp.getSeries(iag); |
464 ipsp.clear(); | 464 ipsp.clear(); |
465 | 465 |
466 if (debug) { | 466 if (debug) { |
467 log.debug("num of iso regions: " + numRegions); | 467 log.debug("num of iso regions: " + numRegions); |
468 log.debug("num of iso series: " + ps.size()); | 468 log.debug("num of iso series: " + ps.size()); |
628 @Override | 628 @Override |
629 protected void createCSV( | 629 protected void createCSV( |
630 OutputStream outputStream, | 630 OutputStream outputStream, |
631 Collection<Result> chartResult | 631 Collection<Result> chartResult |
632 ) | 632 ) |
633 throws UnsupportedEncodingException, IOException, StateException | 633 throws UnsupportedEncodingException, IOException, StateException |
634 { | 634 { |
635 // TODO: Implement a substitution which makes sense. | 635 // TODO: Implement a substitution which makes sense. |
636 } | 636 } |
637 } | 637 } |
638 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 638 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |