Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadUnit.java @ 4994:63617e142dfe
Quick-fix for floodmaps. Use the correct projection for DGM.
* Added projection for DGM to floodmap.xml.
* Use DGM projection to create axis.shp and qps.shp.
* Write DGM projection to wsplgen layer mapfile.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 15 Feb 2013 10:56:08 +0100 |
parents | c6db11e3b83a |
children |
rev | line source |
---|---|
4220
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states.minfo; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
3 import org.apache.log4j.Logger; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
4 import org.w3c.dom.Element; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
5 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.artifacts.Artifact; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.CallContext; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.CallMeta; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifacts.common.utils.XMLUtils; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.flys.artifacts.resources.Resources; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.artifacts.states.DefaultState; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 public class SedimentLoadUnit |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 extends DefaultState |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 /** The logger used in this class. */ |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 private static Logger logger = Logger.getLogger(SedimentLoadUnit.class); |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 /** |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 * The default constructor that initializes an empty State object. |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 */ |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 public SedimentLoadUnit() { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 } |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 @Override |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 protected String getUIProvider() { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 return "minfo.sedimentload_unit_select"; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 } |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 @Override |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 protected Element[] createItems( |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 XMLUtils.ElementCreator ec, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 Artifact artifact, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 String name, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 CallContext context) |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 CallMeta meta = context.getMeta(); |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 Element[] elements = new Element[2]; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 elements[0] = createItem( |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 ec, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 new String[] { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 Resources.getMsg(meta, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 "state.minfo.t_per_a", |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 "state.minfo.t_per_a"), |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 "t_per_a"}); |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 elements[1] = createItem( |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
50 ec, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 new String[] { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 Resources.getMsg(meta, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 "state.minfo.m3_per_a", |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 "state.minfo.m3_per_a"), |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 "m3_per_a"}); |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
56 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
57 return elements; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 } |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 } |