Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java @ 3126:fe9be7ccc5e8
Fixed binary search in Parameters.
flys-artifacts/trunk@4727 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 20 Jun 2012 15:03:29 +0000 |
parents | 0ca00d547f35 |
children | c8f670ae96e8 |
rev | line source |
---|---|
2581
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import org.w3c.dom.Document; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import org.apache.log4j.Logger; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import com.vividsolutions.jts.geom.Envelope; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.artifacts.ArtifactFactory; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.artifacts.CallMeta; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.artifactdatabase.state.DefaultOutput; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.artifactdatabase.state.Facet; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.artifactdatabase.state.State; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.flys.model.River; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.flys.model.Floodmaps; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 import de.intevation.flys.artifacts.model.FacetTypes; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 import de.intevation.flys.artifacts.model.RiverFactory; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 import de.intevation.flys.utils.FLYSUtils; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public class WMSFloodmapsArtifact extends WMSDBArtifact { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public static final String NAME = "floodmaps"; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 private static final Logger logger = |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 Logger.getLogger(WMSFloodmapsArtifact.class); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 public void setup( |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 String identifier, |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 ArtifactFactory factory, |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 Object context, |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 CallMeta callMeta, |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 Document data) |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 logger.debug("WMSFloodmapsArtifact.setup"); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 super.setup(identifier, factory, context, callMeta, data); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 public String getName() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 return NAME; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 public State getCurrentState(Object cc) { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 State s = new FloodmapsState(this); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 List<Facet> fs = facets.get(getCurrentStateId()); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 DefaultOutput o = new DefaultOutput( |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 "floodmap", |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 "floodmap", |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 "image/png", |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 fs, |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 "map"); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 s.getOutputs().add(o); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 return s; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 public static class FloodmapsState extends WMSDBState implements FacetTypes |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 private static final Logger logger = |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 Logger.getLogger(FloodmapsState.class); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 protected int riverId; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 public FloodmapsState(WMSDBArtifact artifact) { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 super(artifact); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 riverId = 0; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 protected String getFacetType() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 return FLOODMAP_FLOODMAPS; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 protected String getUrl() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 return FLYSUtils.getUserWMSUrl(artifact.identifier()); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 protected String getSrid() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 River river = RiverFactory.getRiver(getRiverId()); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 return FLYSUtils.getRiverSrid(river.getName()); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 protected Envelope getExtent() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 List<Floodmaps> floodmaps = |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2595
diff
changeset
|
105 Floodmaps.getFloodmaps(getRiverId(), getName()); |
2581
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 Envelope max = null; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 for (Floodmaps f: floodmaps) { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 Envelope env = f.getGeom().getEnvelopeInternal(); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 if (max == null) { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 max = env; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 continue; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 max.expandToInclude(env); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 return max; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 protected String getFilter() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 return "river_id=" + String.valueOf(getRiverId()) |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2595
diff
changeset
|
126 + " AND name='" + getName() + "'"; |
2581
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 protected String getDataString() { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 String srid = getSrid(); |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 if (FLYSUtils.isUsingOracle()) { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 return "geom FROM floodmaps USING SRID " + srid; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 else { |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 return "geom FROM floodmaps USING UNIQUE id USING SRID " + srid; |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 @Override |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 protected String getGeometryType() { |
2595
b23c956c5aa2
Fixed broken Floodmaps in datacage for floodmap output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2581
diff
changeset
|
143 return "POLYGON"; |
2581
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 } // end of WMSKmState |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 } |
afebbe9c2fce
Added a new Artifact for loading existing 'floodmaps' via datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |