Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java @ 2639:a78dafdd8590
Issue 657.
Added file upload service to load a user defined shapefile.
User the shapefile for wsplgen calculation and display a new layer.
flys-artifacts/trunk@4292 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 25 Apr 2012 07:45:00 +0000 |
parents | ccad7a6ddaa4 |
children | 4bd3d8bbb60c |
comparison
equal
deleted
inserted
replaced
2638:ccad7a6ddaa4 | 2639:a78dafdd8590 |
---|---|
24 import de.intevation.flys.utils.MapfileGenerator; | 24 import de.intevation.flys.utils.MapfileGenerator; |
25 | 25 |
26 | 26 |
27 public class FacetCreator implements FacetTypes { | 27 public class FacetCreator implements FacetTypes { |
28 | 28 |
29 public static final String I18N_WSPLGEN_RESULT = "floodmap.uesk"; | 29 public static final String I18N_WSPLGEN_RESULT = "floodmap.uesk"; |
30 public static final String I18N_WSPLGEN_DEFAULT = "floodmap.uesk"; | 30 public static final String I18N_WSPLGEN_DEFAULT = "floodmap.uesk"; |
31 public static final String I18N_BARRIERS = "floodmap.barriers"; | 31 public static final String I18N_BARRIERS = "floodmap.barriers"; |
32 public static final String I18N_BARRIERS_DEFAULT = "floodmap.barriers"; | 32 public static final String I18N_BARRIERS_DEFAULT = "floodmap.barriers"; |
33 public static final String I18N_USERSHAPE = "floodmap.usershape"; | |
34 public static final String I18N_USERSHAPE_DEFAULT = "floodmap.usershape"; | |
33 | 35 |
34 protected FLYSArtifact artifact; | 36 protected FLYSArtifact artifact; |
35 | 37 |
36 protected CallContext cc; | 38 protected CallContext cc; |
37 | 39 |
156 | 158 |
157 tmpFacets.add(barriers); | 159 tmpFacets.add(barriers); |
158 } | 160 } |
159 | 161 |
160 | 162 |
163 public void createUserShapeFacet() { | |
164 WMSLayerFacet shape = new WMSLayerFacet( | |
165 1, | |
166 FLOODMAP_USERSHAPE, | |
167 Resources.getMsg( | |
168 cc.getMeta(), | |
169 I18N_USERSHAPE, | |
170 I18N_USERSHAPE_DEFAULT), | |
171 ComputeType.ADVANCE, | |
172 stateId, | |
173 hash, | |
174 getUrl()); | |
175 | |
176 shape.addLayer( | |
177 MapfileGenerator.MS_USERSHAPE_PREFIX + artifact.identifier()); | |
178 shape.setSrid(getSrid()); | |
179 shape.setExtent(getBounds()); | |
180 | |
181 tmpFacets.add(shape); | |
182 } | |
183 | |
184 | |
161 public void finish() { | 185 public void finish() { |
162 facets.addAll(getFacets()); | 186 facets.addAll(getFacets()); |
163 } | 187 } |
164 } // end of FacetCreator | 188 } // end of FacetCreator |