annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSJettiesArtifact.java @ 5756:b73de25c01b4

Draw stamp on white background and some layout improvements
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 18 Apr 2013 11:40:52 +0200
parents 559a009b3d72
children
rev   line source
5552
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 import java.util.List;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 import org.w3c.dom.Document;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 import org.apache.log4j.Logger;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 import com.vividsolutions.jts.geom.Envelope;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 import de.intevation.artifacts.ArtifactFactory;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 import de.intevation.artifacts.CallMeta;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 import de.intevation.artifactdatabase.state.DefaultOutput;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 import de.intevation.artifactdatabase.state.Facet;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 import de.intevation.artifactdatabase.state.State;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18 import de.intevation.flys.model.River;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 import de.intevation.flys.model.Jetty;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 import de.intevation.flys.artifacts.model.FacetTypes;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 import de.intevation.flys.artifacts.model.RiverFactory;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 import de.intevation.flys.utils.FLYSUtils;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 import de.intevation.flys.utils.GeometryUtils;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 public class WMSJettiesArtifact extends WMSDBArtifact {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29 public static final String NAME = "jetties";
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 private static final Logger logger =
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33 Logger.getLogger(WMSJettiesArtifact.class);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37 public void setup(
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 String identifier,
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 ArtifactFactory factory,
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 Object context,
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 CallMeta callMeta,
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
42 Document data)
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43 {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44 logger.debug("WMSJettiesArtifact.setup");
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46 super.setup(identifier, factory, context, callMeta, data);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
51 public String getName() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
52 return NAME;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
53 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
54
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
55
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
56 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
57 public State getCurrentState(Object cc) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
58 State s = new JettiesState(this);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
59
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
60 List<Facet> fs = getFacets(getCurrentStateId());
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
61
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
62 DefaultOutput o = new DefaultOutput(
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
63 "floodmap",
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
64 "floodmap",
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65 "image/png",
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
66 fs,
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
67 "map");
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
68
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
69 s.getOutputs().add(o);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
70
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
71 return s;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
72 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
73
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
74
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
75 public static class JettiesState extends WMSDBState implements FacetTypes
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
76 {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77 private static final Logger logger =
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78 Logger.getLogger(JettiesState.class);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
79
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
80 protected int riverId;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
81
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
82 public JettiesState(WMSDBArtifact artifact) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
83 super(artifact);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
84 riverId = 0;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
85 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
86
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
87 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
88 protected String getFacetType() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
89 return FLOODMAP_JETTIES;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
90 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
91
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
92 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
93 protected String getUrl() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
94 return FLYSUtils.getUserWMSUrl(artifact.identifier());
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
95 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
96
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
97 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
98 protected String getSrid() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
99 River river = RiverFactory.getRiver(getRiverId());
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
100 return FLYSUtils.getRiverSrid(river.getName());
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
101 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
102
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
103 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
104 protected Envelope getExtent(boolean reproject) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
105 List<Jetty> jetties;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
106 String kind = getIdPart(2);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
107
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
108 jetties = Jetty.getJetties(getRiverId(), Integer.parseInt(kind));
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
109
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
110 Envelope max = null;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
111
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
112 for (Jetty b: jetties) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
113 Envelope env = b.getGeom().getEnvelopeInternal();
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
114
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
115 if (max == null) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
116 max = env;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
117 continue;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
118 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
119
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
120 max.expandToInclude(env);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
121 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
122
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
123 return max != null && reproject
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
124 ? GeometryUtils.transform(max, getSrid())
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
125 : max;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
126 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
127
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
128 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
129 protected String getFilter() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
130 // The expected id string is:
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
131 // river_id;layer-name;kind
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
132
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
133 String kind = getIdPart(2);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
134 return "river_id=" + String.valueOf(getRiverId()) +
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
135 " AND kind_id=" + kind;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
136 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
137
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
138 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
139 protected String getDataString() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
140 String srid = getSrid();
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
141
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
142 if (FLYSUtils.isUsingOracle()) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
143 return "geom FROM jetties USING SRID " + srid;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
144 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
145 else {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
146 return "geom FROM jetties USING UNIQUE id USING SRID " + srid;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
147 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
148 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
149
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
150 @Override
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
151 protected String getGeometryType() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
152 return "POINT";
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
153 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
154 } // end of WMSKmState
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
155 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
156 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org