Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 1134:bcf70a452646
Read barrier layers from filesystem while mapfile creation and build a facet for this layer in the artifact.
flys-artifacts/trunk@2654 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 06 Sep 2011 15:25:54 +0000 |
parents | effe8f945c93 |
children | c07e9e9c7482 |
comparison
equal
deleted
inserted
replaced
1133:e011f8c6e5e8 | 1134:bcf70a452646 |
---|---|
45 import de.intevation.flys.artifacts.model.WSPLGENJob; | 45 import de.intevation.flys.artifacts.model.WSPLGENJob; |
46 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; | 46 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
47 import de.intevation.flys.exports.WstWriter; | 47 import de.intevation.flys.exports.WstWriter; |
48 import de.intevation.flys.utils.FLYSUtils; | 48 import de.intevation.flys.utils.FLYSUtils; |
49 import de.intevation.flys.utils.GeometryUtils; | 49 import de.intevation.flys.utils.GeometryUtils; |
50 import de.intevation.flys.utils.MapfileGenerator; | |
50 import de.intevation.flys.wsplgen.Scheduler; | 51 import de.intevation.flys.wsplgen.Scheduler; |
51 | 52 |
52 | 53 |
53 public class FloodMapState | 54 public class FloodMapState |
54 extends DefaultState | 55 extends DefaultState |
112 scheduler.addJob(job); | 113 scheduler.addJob(job); |
113 | 114 |
114 String url = FLYSUtils.getXPathString(FLYSUtils.XPATH_MAPSERVER_URL); | 115 String url = FLYSUtils.getXPathString(FLYSUtils.XPATH_MAPSERVER_URL); |
115 url = url + "user-wms"; | 116 url = url + "user-wms"; |
116 | 117 |
117 WMSLayerFacet facet = new WMSLayerFacet( | 118 WMSLayerFacet wsplgen = new WMSLayerFacet( |
118 0, | 119 0, |
119 FLOODMAP_WSPLGEN, | 120 FLOODMAP_WSPLGEN, |
120 "Ergebnis der WSPLGEN Berechnung", | 121 "Ergebnis der WSPLGEN Berechnung", |
121 ComputeType.ADVANCE, | 122 ComputeType.ADVANCE, |
122 getID(), | 123 getID(), |
123 hash, | 124 hash, |
124 url); | 125 url); |
125 | 126 |
126 facet.addLayer(artifact.identifier()); | 127 String srid = FLYSUtils.getRiverSrid(artifact); |
127 facet.setSrid(FLYSUtils.getRiverSrid(artifact)); | 128 |
128 | 129 wsplgen.addLayer( |
129 facets.add(facet); | 130 artifact.identifier() + MapfileGenerator.MS_WSPLGEN_POSTFIX); |
131 wsplgen.setSrid(srid); | |
132 | |
133 WMSLayerFacet barriers = new WMSLayerFacet( | |
134 1, | |
135 FLOODMAP_WSPLGEN, | |
136 "Rohre/Graeben/Daemme", | |
137 ComputeType.ADVANCE, | |
138 getID(), | |
139 hash, | |
140 url); | |
141 | |
142 barriers.addLayer( | |
143 artifact.identifier() + MapfileGenerator.MS_BARRIERS_POSTFIX); | |
144 barriers.setSrid(srid); | |
145 | |
146 facets.add(wsplgen); | |
147 facets.add(barriers); | |
130 | 148 |
131 context.afterCall(CallContext.BACKGROUND); | 149 context.afterCall(CallContext.BACKGROUND); |
132 | 150 |
133 return null; | 151 return null; |
134 } | 152 } |