Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java @ 5462:f2371f3aaf03
Show top level folder icons only if node has no factory
If you have an empty folder the folder icon is still shown.
This makes it possible to add functional "Top Level" entries
in the Datacage
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 26 Mar 2013 18:29:13 +0100 |
parents | ffa5eaad3a7b |
children | ae60bb7b8085 |
rev | line source |
---|---|
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
3 import com.vividsolutions.jts.geom.Envelope; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
4 import com.vividsolutions.jts.geom.Geometry; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
5 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
6 import de.intevation.artifactdatabase.state.DefaultOutput; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifactdatabase.state.Facet; |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
8 import de.intevation.artifactdatabase.state.State; |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
9 import de.intevation.artifacts.ArtifactFactory; |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
10 import de.intevation.artifacts.CallMeta; |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
11 import de.intevation.flys.artifacts.model.FacetTypes; |
1075
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
12 import de.intevation.flys.artifacts.model.RiverFactory; |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
13 import de.intevation.flys.model.River; |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
14 import de.intevation.flys.utils.FLYSUtils; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
15 import de.intevation.flys.utils.GeometryUtils; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
17 import java.util.List; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
19 import org.apache.log4j.Logger; |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
20 import org.w3c.dom.Document; |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
21 |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
22 @Deprecated |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
23 public class RiverAxisArtifact extends WMSDBArtifact { |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public static final String NAME = "riveraxis"; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 private static final Logger logger = |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 Logger.getLogger(RiverAxisArtifact.class); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 @Override |
1075
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
33 public void setup( |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
34 String identifier, |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
35 ArtifactFactory factory, |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
36 Object context, |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
37 CallMeta callMeta, |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
38 Document data) |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
39 { |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
40 logger.debug("RiverAxisArtifact.setup"); |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
1075
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
42 super.setup(identifier, factory, context, callMeta, data); |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 } |
1075
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
44 |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
45 |
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
46 @Override |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
47 public String getName() { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
48 return NAME; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
49 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
50 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
51 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
52 @Override |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
53 public State getCurrentState(Object cc) { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
54 State s = new RiverAxisState(this); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
55 |
4497
a2735a4bf75e
Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents:
3923
diff
changeset
|
56 List<Facet> fs = getFacets(getCurrentStateId()); |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
57 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
58 DefaultOutput o = new DefaultOutput( |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
59 "floodmap", |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
60 "floodmap", |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
61 "image/png", |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
62 fs, |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
63 "map"); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
64 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
65 s.getOutputs().add(o); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
66 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
67 return s; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
68 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
69 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
70 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
71 public static class RiverAxisState extends WMSDBState implements FacetTypes |
1075
feaf778d510e
Changed the way of collecting the data for the RiverAxisArtifact - use the database instead of a Master-Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
72 { |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
73 private static final Logger logger = |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
74 Logger.getLogger(RiverAxisState.class); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
75 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
76 protected Geometry geom; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
77 protected int riverId; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
78 |
2082
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1845
diff
changeset
|
79 public RiverAxisState(){} |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1845
diff
changeset
|
80 |
2089
0da8874bd378
Added initial state to map artifact to be able to advance and step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2082
diff
changeset
|
81 public RiverAxisState(FLYSArtifact artifact) { |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
82 super(artifact); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
83 riverId = 0; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
84 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
85 |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
86 @Override |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
87 public int getRiverId() { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
88 if (riverId == 0) { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
89 String ids = artifact.getDataAsString("ids"); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
90 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
91 try { |
3405
b0ba96bbf01d
Use Integer.parseInt() instead of Integer.valueOf() + Autounboxing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3301
diff
changeset
|
92 riverId = Integer.parseInt(ids); |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
93 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
94 catch (NumberFormatException nfe) { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
95 logger.error("Cannot parse river id from '" + ids + "'"); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
96 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
97 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
98 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
99 return riverId; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
100 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
101 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
102 @Override |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
103 protected String getFacetType() { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
104 return FLOODMAP_RIVERAXIS; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
105 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
106 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
107 @Override |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
108 protected String getLayer() { |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
109 return RiverFactory.getRiver(getRiverId()).getName(); |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
110 } |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
111 |
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
112 @Override |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
113 protected String getUrl() { |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4497
diff
changeset
|
114 return FLYSUtils.getRiverWMSUrl(); |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
115 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
116 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
117 @Override |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
118 protected String getSrid() { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
119 River river = RiverFactory.getRiver(getRiverId()); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
120 return FLYSUtils.getRiverSrid(river.getName()); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
121 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
122 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
123 @Override |
3918
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
124 protected Envelope getExtent(boolean reproject) { |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
125 River river = RiverFactory.getRiver(getRiverId()); |
3923
9fac337192c9
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3918
diff
changeset
|
126 |
3918
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
127 if (reproject) { |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
128 logger.debug("Query extent for RiverAxis with Srid: " + getSrid()); |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
129 return GeometryUtils.transform( |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
130 GeometryUtils.getRiverBoundary(river.getName()), |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
131 getSrid()); |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
132 } |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
133 else { |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
134 return GeometryUtils.transform( |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
135 GeometryUtils.getRiverBoundary(river.getName()), |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
136 "31467"); |
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
137 } |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
138 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
139 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
140 @Override |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
141 protected String getFilter() { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
142 return "river_id=" + String.valueOf(getRiverId()); |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
143 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
144 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
145 @Override |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
146 protected String getDataString() { |
1845
06c157848c8f
Made the floodmap compatible with an Oracle database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1832
diff
changeset
|
147 if (FLYSUtils.isUsingOracle()) { |
5304
ffa5eaad3a7b
Fix river_axes maps when using oracle.
Andre Heinecke <aheinecke@intevation.de>
parents:
4864
diff
changeset
|
148 return "geom FROM river_axes USING SRID " + getSrid(); |
1845
06c157848c8f
Made the floodmap compatible with an Oracle database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1832
diff
changeset
|
149 } |
06c157848c8f
Made the floodmap compatible with an Oracle database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1832
diff
changeset
|
150 else { |
3918
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3405
diff
changeset
|
151 return "geom FROM river_axes USING UNIQUE id"; |
1845
06c157848c8f
Made the floodmap compatible with an Oracle database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1832
diff
changeset
|
152 } |
1832
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
153 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
154 |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
155 @Override |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
156 protected String getGeometryType() { |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
157 return "LINE"; |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
158 } |
a8910c1c82fb
Refactored the RiverAxisArtifact and its State - uses the same base as WMSKmArtifact now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1771
diff
changeset
|
159 } // end of WMSKmState |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |