Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java @ 7166:0e1191e34b5f
TRUE != FALSE ;)
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 26 Sep 2013 12:21:34 +0200 |
parents | ada424214b02 |
children | e4606eae8ea5 |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5867
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5867
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
9 package org.dive4elements.river.exports; |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
11 import org.dive4elements.artifactdatabase.data.StateData; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
12 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
13 import org.dive4elements.artifactdatabase.state.Facet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
14 import org.dive4elements.artifactdatabase.state.Settings; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
15 import org.dive4elements.artifacts.Artifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
16 import org.dive4elements.artifacts.CallContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
17 import org.dive4elements.artifacts.common.ArtifactNamespaceContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
18 import org.dive4elements.artifacts.common.utils.XMLUtils; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
19 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
20 import org.dive4elements.river.artifacts.D4EArtifact; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
21 import org.dive4elements.river.artifacts.model.FacetTypes; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
22 import org.dive4elements.river.artifacts.model.map.WMSDBLayerFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
23 import org.dive4elements.river.artifacts.model.map.WMSLayerFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
24 import org.dive4elements.river.artifacts.model.map.WSPLGENLayerFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
25 import org.dive4elements.river.artifacts.states.WaterlevelGroundDifferences; |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
26 import org.dive4elements.river.collections.D4EArtifactCollection; |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
27 import org.dive4elements.river.themes.ThemeDocument; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
28 import org.dive4elements.river.utils.ArtifactMapfileGenerator; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5655
diff
changeset
|
29 import org.dive4elements.river.utils.GeometryUtils; |
6831
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
30 |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
31 import java.io.File; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
32 import java.io.FileNotFoundException; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
33 import java.io.IOException; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
34 import java.io.OutputStream; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
35 import java.util.ArrayList; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
36 import java.util.List; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
37 |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
38 import org.apache.log4j.Logger; |
3306
1b41dc00b1f7
Create shapefile directory instead of shapefile 'file'
Christian Lins <christian.lins@intevation.de>
parents:
3302
diff
changeset
|
39 import org.w3c.dom.Document; |
1b41dc00b1f7
Create shapefile directory instead of shapefile 'file'
Christian Lins <christian.lins@intevation.de>
parents:
3302
diff
changeset
|
40 import org.w3c.dom.Element; |
1b41dc00b1f7
Create shapefile directory instead of shapefile 'file'
Christian Lins <christian.lins@intevation.de>
parents:
3302
diff
changeset
|
41 |
6831
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
42 import com.vividsolutions.jts.geom.Envelope; |
8c7433b8656d
Backed out changeset 74a437805e2a
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6826
diff
changeset
|
43 |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 public class MapGenerator implements OutGenerator, FacetTypes { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 private static Logger logger = Logger.getLogger(MapGenerator.class); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
49 protected D4EArtifactCollection collection; |
3422
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3306
diff
changeset
|
50 |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 protected Artifact master; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
2047
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
53 protected Settings settings; |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
54 |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 protected Document request; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 protected OutputStream out; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 protected CallContext context; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 protected List<WMSLayerFacet> layers; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 protected Envelope maxExtent; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 protected Envelope initialExtent; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 protected String srid; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 |
7077
0a337f0005c2
Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7037
diff
changeset
|
68 protected String outName; |
0a337f0005c2
Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7037
diff
changeset
|
69 |
7037
5c6fd2c010dd
Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6905
diff
changeset
|
70 @Override |
7087
ada424214b02
Use Object instead of DOM Element as argument for setup of out generators. First step to remove dependency to XML DOM when using configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7077
diff
changeset
|
71 public void setup(Object config) { |
7037
5c6fd2c010dd
Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6905
diff
changeset
|
72 logger.debug("MapGenerator.setup"); |
5c6fd2c010dd
Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6905
diff
changeset
|
73 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 @Override |
7077
0a337f0005c2
Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7037
diff
changeset
|
76 public void init(String outName, Document request, OutputStream out, CallContext context) { |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 logger.debug("MapGenerator.init"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 |
7077
0a337f0005c2
Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7037
diff
changeset
|
79 this.outName = outName; |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 this.request = request; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 this.out = out; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 this.context = context; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 this.layers = new ArrayList<WMSLayerFacet>(); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 this.maxExtent = null; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 this.initialExtent = null; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 @Override |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 public void setMasterArtifact(Artifact master) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 logger.debug("MapGenerator.setMasterArtifact"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 this.master = master; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
3422
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3306
diff
changeset
|
97 @Override |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
98 public void setCollection(D4EArtifactCollection collection) { |
3422
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3306
diff
changeset
|
99 this.collection = collection; |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3306
diff
changeset
|
100 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 @Override |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 public void doOut( |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1793
diff
changeset
|
104 ArtifactAndFacet artifactFacet, |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
105 ThemeDocument attr, |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1793
diff
changeset
|
106 boolean visible) |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 { |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1793
diff
changeset
|
108 String name = artifactFacet.getFacetName(); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1793
diff
changeset
|
110 logger.debug("MapGenerator.doOut: " + |
6170
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
111 artifactFacet.getArtifact().identifier() + " | " + name); |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
112 D4EArtifact flys = (D4EArtifact) artifactFacet.getArtifact(); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1793
diff
changeset
|
114 Facet nativeFacet = artifactFacet.getFacet(); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 if (nativeFacet instanceof WMSLayerFacet) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 WMSLayerFacet wms = (WMSLayerFacet) nativeFacet; |
3918
2fdbe78a8fc2
Fixed various projection issues during map creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3422
diff
changeset
|
118 Envelope extent = wms.getOriginalExtent(); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 layers.add(wms); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 setMaxExtent(extent); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 setSrid(wms.getSrid()); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 |
1775
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
125 if (FLOODMAP_WSPLGEN.equals(name)) { |
2091
5d158f8ad080
#298 Fixed broken auto-zoom-to-wsplgen in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2082
diff
changeset
|
126 setInitialExtent(extent); |
2616
27cc95e65f18
Defined a style for WSPLGEN layers which are now modifiable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2091
diff
changeset
|
127 createWSPLGENLayer(flys, wms, attr); |
1775
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
128 } |
6833
20f98087664d
(issue657) Prevent errornous recreation of usershape mapfile fragment.
Christian Lins <christian.lins@intevation.de>
parents:
6831
diff
changeset
|
129 // FIXME: Already generated by HWSBarrierState |
20f98087664d
(issue657) Prevent errornous recreation of usershape mapfile fragment.
Christian Lins <christian.lins@intevation.de>
parents:
6831
diff
changeset
|
130 // wms has a wrong SRID which would break that layer |
20f98087664d
(issue657) Prevent errornous recreation of usershape mapfile fragment.
Christian Lins <christian.lins@intevation.de>
parents:
6831
diff
changeset
|
131 //else if (FLOODMAP_USERSHAPE.equals(name)) { |
20f98087664d
(issue657) Prevent errornous recreation of usershape mapfile fragment.
Christian Lins <christian.lins@intevation.de>
parents:
6831
diff
changeset
|
132 // createUserShapeLayer(flys, wms); |
20f98087664d
(issue657) Prevent errornous recreation of usershape mapfile fragment.
Christian Lins <christian.lins@intevation.de>
parents:
6831
diff
changeset
|
133 //} |
1792
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
134 else { |
4864
dc0d37715e16
Floodmap uses the static River-WMS instead of User-WMS via RiverAxisArtifact.
Christian Lins <christian.lins@intevation.de>
parents:
4702
diff
changeset
|
135 logger.debug("doOut: createDatabaseLayer for facet name: " + name); |
1793
1636686070f7
Initial commit to support styles in maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1792
diff
changeset
|
136 createDatabaseLayer(flys, wms, attr); |
1792
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
137 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 else { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 logger.warn("Facet not supported: " + nativeFacet.getClass()); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 } |
1775
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
142 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 |
1775
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
144 |
2616
27cc95e65f18
Defined a style for WSPLGEN layers which are now modifiable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2091
diff
changeset
|
145 protected void createWSPLGENLayer( |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
146 D4EArtifact flys, |
2616
27cc95e65f18
Defined a style for WSPLGEN layers which are now modifiable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2091
diff
changeset
|
147 WMSLayerFacet wms, |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
148 ThemeDocument attr |
2616
27cc95e65f18
Defined a style for WSPLGEN layers which are now modifiable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2091
diff
changeset
|
149 ) { |
1776
7d1bd710a4b3
Made flys-artifacts compilable again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1775
diff
changeset
|
150 try { |
2638
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
151 if(wms instanceof WSPLGENLayerFacet) { |
5655
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
152 // Retrieve waterlevel ground differences from artifact |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
153 StateData dFrom = flys.getData(WaterlevelGroundDifferences.LOWER_FIELD); |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
154 StateData dTo = flys.getData(WaterlevelGroundDifferences.UPPER_FIELD); |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
155 StateData dStep = flys.getData(WaterlevelGroundDifferences.DIFF_FIELD); |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
156 |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
157 String fromStr = dFrom != null ? (String) dFrom.getValue() : null; |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
158 String toStr = dTo != null ? (String) dTo.getValue() : null; |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
159 String stepStr = dStep != null ? (String) dStep.getValue() : null; |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
160 |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
161 float from = Float.parseFloat(fromStr); |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
162 float to = Float.parseFloat(toStr); |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
163 float step = Float.parseFloat(stepStr); |
53a2ceeae9a3
Create floodmap colorrange dynamically from artifact parameters. Theme setting for colorrange classes is currently not functioning (wasn't before either).
Christian Lins <christian.lins@intevation.de>
parents:
4864
diff
changeset
|
164 |
4702
13abfb1bcb75
Fix typo in class names and correct file path in floodmap.xml.
Christian Lins <christian.lins@intevation.de>
parents:
4654
diff
changeset
|
165 ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator(); |
2638
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
166 mfg.createUeskLayer( |
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
167 flys, |
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
168 (WSPLGENLayerFacet) wms, |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
169 attr.createDynamicMapserverStyle( |
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
170 from, to, step, context.getMeta()), |
2638
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
171 context); |
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
172 } |
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
173 else { |
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
174 logger.warn("Cannot create WSPLGEN layer from: " + |
6170
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
175 wms.getClass()); |
2638
ccad7a6ddaa4
Issue 560.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2637
diff
changeset
|
176 } |
1776
7d1bd710a4b3
Made flys-artifacts compilable again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1775
diff
changeset
|
177 } |
7d1bd710a4b3
Made flys-artifacts compilable again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1775
diff
changeset
|
178 catch (IOException ioe) { |
7d1bd710a4b3
Made flys-artifacts compilable again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1775
diff
changeset
|
179 logger.error(ioe, ioe); |
7d1bd710a4b3
Made flys-artifacts compilable again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1775
diff
changeset
|
180 } |
1775
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
181 } |
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
182 |
0156105222c9
Improved the MapfileGenerator. It offers methods to create barrier and wsplgen layer files for mapserver.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1774
diff
changeset
|
183 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
184 protected void createUserShapeLayer(D4EArtifact flys, WMSLayerFacet wms) { |
4702
13abfb1bcb75
Fix typo in class names and correct file path in floodmap.xml.
Christian Lins <christian.lins@intevation.de>
parents:
4654
diff
changeset
|
185 ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator(); |
2639
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
186 |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
187 try { |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
188 mfg.createUserShapeLayer(flys, wms); |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
189 } |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
190 catch (FileNotFoundException fnfe) { |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
191 logger.error(fnfe, fnfe); |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
192 } |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
193 catch (IOException ioe) { |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
194 logger.error(ioe, ioe); |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
195 } |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
196 } |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
197 |
a78dafdd8590
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2638
diff
changeset
|
198 |
1793
1636686070f7
Initial commit to support styles in maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1792
diff
changeset
|
199 protected void createDatabaseLayer( |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
200 D4EArtifact flys, |
1793
1636686070f7
Initial commit to support styles in maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1792
diff
changeset
|
201 WMSLayerFacet wms, |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
202 ThemeDocument attr |
1793
1636686070f7
Initial commit to support styles in maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1792
diff
changeset
|
203 ) { |
1792
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
204 logger.debug("createDatabaseLayer for facet: " + wms.getName()); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
205 |
4702
13abfb1bcb75
Fix typo in class names and correct file path in floodmap.xml.
Christian Lins <christian.lins@intevation.de>
parents:
4654
diff
changeset
|
206 ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator(); |
1792
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
207 |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
208 try { |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
209 File baseDir = mfg.getShapefileBaseDir(); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
210 File artDir = new File(baseDir, flys.identifier()); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
211 |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
212 if (artDir != null && !artDir.exists()) { |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
213 logger.debug("Create new directory: " + artDir.getPath()); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
214 artDir.mkdir(); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
215 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
216 |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
217 if (wms instanceof WMSDBLayerFacet) { |
1793
1636686070f7
Initial commit to support styles in maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1792
diff
changeset
|
218 mfg.createDatabaseLayer( |
6170
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
219 flys, |
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
220 (WMSDBLayerFacet) wms, |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6833
diff
changeset
|
221 attr.createMapserverStyle()); |
1792
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
222 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
223 else { |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
224 logger.warn("Cannot create DB layer from: " + wms.getClass()); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
225 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
226 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
227 catch (FileNotFoundException fnfe) { |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
228 logger.error(fnfe, fnfe); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
229 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
230 catch (IOException ioe) { |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
231 logger.error(ioe, ioe); |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
232 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
233 } |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
234 |
49ad801076e4
Enabled the MapGenerator to create WMS layers with database datastore - riveraxis is the first layer that is no longer fetched from static WMS service but from user specific one.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1781
diff
changeset
|
235 |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
236 @Override |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
237 public void generate() |
6170
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
238 throws IOException |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
239 { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
240 logger.debug("MapGenerator.generate"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
241 |
4702
13abfb1bcb75
Fix typo in class names and correct file path in floodmap.xml.
Christian Lins <christian.lins@intevation.de>
parents:
4654
diff
changeset
|
242 ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator(); |
4654
861c47e0a8a0
Refactor Mapserver mapfile generation.
Christian Lins <christian.lins@intevation.de>
parents:
4633
diff
changeset
|
243 mfg.generate(); |
1781
ef2300b450bf
Modified the process to create mapfiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1776
diff
changeset
|
244 |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
245 Document response = XMLUtils.newDocument(); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
246 ElementCreator c = new ElementCreator( |
6170
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
247 response, |
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
248 ArtifactNamespaceContext.NAMESPACE_URI, |
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
249 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
250 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
251 Element root = c.create("floodmap"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
252 Element layers = c.create("layers"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
253 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
254 response.appendChild(root); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
255 root.appendChild(layers); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
256 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
257 appendLayers(layers); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
258 appendMapInformation(root, c); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
259 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
260 XMLUtils.toStream(response, out); |
6170
194a99865d73
createWSPLGENClassName() now respects user locale (#767).
Christian Lins <christian.lins@intevation.de>
parents:
5994
diff
changeset
|
261 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
262 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
263 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
264 protected void appendLayers(Element parent) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
265 for (WMSLayerFacet facet: layers) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
266 parent.appendChild(facet.toXML(parent.getOwnerDocument())); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
267 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
268 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
269 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
270 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
271 protected void setMaxExtent(Envelope maxExtent) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
272 if (maxExtent == null) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
273 return; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
274 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
275 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
276 if (this.maxExtent == null) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
277 logger.debug("Set max extent to: " + maxExtent); |
2091
5d158f8ad080
#298 Fixed broken auto-zoom-to-wsplgen in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2082
diff
changeset
|
278 this.maxExtent = new Envelope(maxExtent); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
279 return; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
280 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
281 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
282 this.maxExtent.expandToInclude(maxExtent); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
283 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
284 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
285 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
286 protected void setInitialExtent(Envelope initialExtent) { |
2091
5d158f8ad080
#298 Fixed broken auto-zoom-to-wsplgen in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2082
diff
changeset
|
287 if (this.initialExtent == null && initialExtent != null) { |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
288 logger.debug("Set initial extent to: " + initialExtent); |
2091
5d158f8ad080
#298 Fixed broken auto-zoom-to-wsplgen in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2082
diff
changeset
|
289 this.initialExtent = new Envelope(initialExtent); |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
290 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
291 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
292 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
293 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
294 protected void setSrid(String srid) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
295 if (srid == null || srid.length() == 0) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
296 return; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
297 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
298 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
299 this.srid = srid; |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
300 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
301 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
302 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
303 protected void appendMapInformation(Element parent, ElementCreator c) { |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
304 String mE = GeometryUtils.jtsBoundsToOLBounds(this.maxExtent); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
305 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
306 Element maxExtent = c.create("maxExtent"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
307 maxExtent.setTextContent(mE); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
308 |
2082
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2047
diff
changeset
|
309 if(this.initialExtent != null) { |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2047
diff
changeset
|
310 String iE = GeometryUtils.jtsBoundsToOLBounds(this.initialExtent); |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2047
diff
changeset
|
311 Element initExtent = c.create("initialExtent"); |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2047
diff
changeset
|
312 initExtent.setTextContent(iE); |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2047
diff
changeset
|
313 parent.appendChild(initExtent); |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2047
diff
changeset
|
314 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
315 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
316 Element srid = c.create("srid"); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
317 srid.setTextContent(this.srid); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
318 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
319 // TODO zoom levels |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
320 // TODO resolutation |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
321 |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
322 parent.appendChild(maxExtent); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
323 parent.appendChild(srid); |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
324 } |
1979
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
325 |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
326 |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
327 /** |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
328 * Returns an instance of <i>EmptySettings</i> currently! |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
329 * |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
330 * @return an instance of <i>EmptySettings</i>. |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
331 */ |
2047
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
332 @Override |
1979
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
333 public Settings getSettings() { |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
334 return new EmptySettings(); |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1944
diff
changeset
|
335 } |
2047
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
336 |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
337 |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
338 @Override |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
339 public void setSettings(Settings settings) { |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
340 this.settings = settings; |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
341 } |
1774
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
342 } |
092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
343 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |