comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java @ 8877:9f7a285b0ee3

Some work on SINFO FlowDepth
author gernotbelger
date Thu, 08 Feb 2018 18:48:24 +0100
parents 7bbfb24e6eec
children 64ca63f79f6f
comparison
equal deleted inserted replaced
8876:23264d1a528f 8877:9f7a285b0ee3
28 public class FlowDepthState 28 public class FlowDepthState
29 extends DefaultState 29 extends DefaultState
30 { 30 {
31 /// ** The log that is used in this state. */ 31 /// ** The log that is used in this state. */
32 // private static Logger log = Logger.getLogger(FlowDepthState.class); 32 // private static Logger log = Logger.getLogger(FlowDepthState.class);
33
34 private static final long serialVersionUID = 1L;
33 35
34 private static final String I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description"; 36 private static final String I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description";
35 37
36 /** 38 /**
37 * From this state can only be continued trivially. 39 * From this state can only be continued trivially.
98 /* add themes for chart, for each result */ 100 /* add themes for chart, for each result */
99 final List<FlowDepthCalculationResult> resultList = results.getResults(); 101 final List<FlowDepthCalculationResult> resultList = results.getResults();
100 for (int index = 0; index < resultList.size(); index++) { 102 for (int index = 0; index < resultList.size(); index++) {
101 103
102 final FlowDepthCalculationResult result = resultList.get(index); 104 final FlowDepthCalculationResult result = resultList.get(index);
103 /* compute theme label */
104 final String wspLabel = result.getWstLabel();
105 final String soundingLabel = result.getSoundingLabel();
106 final String inputLabel = String.format("%s - %s", wspLabel, soundingLabel);
107 105
108 /* filtered (zoom dependent mean) flow depth */ 106 /* filtered (zoom dependent mean) flow depth */
109 final String facetFlowDepthFilteredDescription = Resources.getMsg( context.getMeta(), I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, inputLabel ); 107 final String facetFlowDepthFilteredDescription = Resources.getMsg( context.getMeta(), I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, result.getLabel() );
110 facets.add(new FlowDepthFilterFacet( 108 facets.add(new FlowDepthFilterFacet(
111 index, 109 index,
112 FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED, 110 FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED,
113 facetFlowDepthFilteredDescription, 111 facetFlowDepthFilteredDescription,
114 ComputeType.ADVANCE, 112 ComputeType.ADVANCE,

http://dive4elements.wald.intevation.org