comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java @ 7646:f603a53e45dc

issue1020: Cosmetics.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 05 Dec 2013 15:35:53 +0100
parents 3cbf8bab1a0f
children 786ff139de5e
comparison
equal deleted inserted replaced
7645:7e5d4a0d9bad 7646:f603a53e45dc
404 if (lineType != null && collectionLines.size() > 0) { 404 if (lineType != null && collectionLines.size() > 0) {
405 File shapeLines = new File(artifactDir, HWS_LINES_SHAPE); 405 File shapeLines = new File(artifactDir, HWS_LINES_SHAPE);
406 successLines = GeometryUtils.writeShapefile( 406 successLines = GeometryUtils.writeShapefile(
407 shapeLines, lineType, collectionLines); 407 shapeLines, lineType, collectionLines);
408 } 408 }
409 if (successLines) { 409 if (successLines) {
410 createMapfile( 410 createMapfile(
411 artifact, 411 artifact,
412 artifactDir, 412 artifactDir,
413 MapfileGenerator.MS_LAYER_PREFIX + HWS_LINES, 413 MapfileGenerator.MS_LAYER_PREFIX + HWS_LINES,
414 HWS_LINES_SHAPE, 414 HWS_LINES_SHAPE,
418 job.addLin(artifactDir + "/" + HWS_LINES_SHAPE); 418 job.addLin(artifactDir + "/" + HWS_LINES_SHAPE);
419 facetCreator.createShapeFacet(I18N_HWS_LINES_OFFICIAL, 419 facetCreator.createShapeFacet(I18N_HWS_LINES_OFFICIAL,
420 MapfileGenerator.MS_LAYER_PREFIX + HWS_LINES, 420 MapfileGenerator.MS_LAYER_PREFIX + HWS_LINES,
421 FLOODMAP_HWS_LINES,2); 421 FLOODMAP_HWS_LINES,2);
422 } 422 }
423 else logger.warn("no lines written");
423 } 424 }
424 425
425 426
426 public static void createMapfile( 427 public static void createMapfile(
427 D4EArtifact artifact, 428 D4EArtifact artifact,
916 protected void setOutFile(D4EArtifact artifact, WSPLGENJob job) { 917 protected void setOutFile(D4EArtifact artifact, WSPLGENJob job) {
917 job.setOutFile(WSPLGEN_OUTPUT_FILE); 918 job.setOutFile(WSPLGEN_OUTPUT_FILE);
918 } 919 }
919 920
920 921
922 /** Gets the Waterlevel of chosen artifact as base for flooding. */
923 // Challenge equals WaterlevelSelectState#getLabel
921 protected WQKms getWQKms(D4EArtifact flys, CallContext cc) { 924 protected WQKms getWQKms(D4EArtifact flys, CallContext cc) {
922 String wspString = flys.getDataAsString(WSP_ARTIFACT); 925 String wspString = flys.getDataAsString(WSP_ARTIFACT);
923 if (wspString == null) { 926 if (wspString == null) {
924 logger.debug("getWQKms(): wspString == null"); 927 logger.debug("getWQKms(): wspString == null");
925 return null; 928 return null;
926 } 929 }
927 String[] parts = wspString.split(";"); 930 String[] parts = wspString.split(";");

http://dive4elements.wald.intevation.org