comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java @ 6330:36dc11244ec3

Group barriers layer and fix polygon layer path to shapefile
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 13 Jun 2013 17:17:45 +0200
parents a0078e5e3b39
children ffc9cb39cea7
comparison
equal deleted inserted replaced
6329:5a7c48dbfeaa 6330:36dc11244ec3
456 info.setDirectory(artifact.identifier()); 456 info.setDirectory(artifact.identifier());
457 info.setTitle(name); 457 info.setTitle(name);
458 info.setData(hwsShapefile); 458 info.setData(hwsShapefile);
459 info.setSrid(srid); 459 info.setSrid(srid);
460 info.setGroupTitle(group); 460 info.setGroupTitle(group);
461 info.setGroup(group + artifact.identifier());
461 MapfileGenerator generator = new ArtifactMapfileGenerator(); 462 MapfileGenerator generator = new ArtifactMapfileGenerator();
462 Template tpl = generator.getTemplateByName(MapfileGenerator.SHP_LAYER_TEMPLATE); 463 Template tpl = generator.getTemplateByName(MapfileGenerator.SHP_LAYER_TEMPLATE);
463 try { 464 try {
464 File layer = new File(artifactDir.getCanonicalPath() + "/" + name); 465 File layer = new File(artifactDir.getCanonicalPath() + "/" + name);
465 generator.writeLayer(info, layer, tpl); 466 generator.writeLayer(info, layer, tpl);
598 dir, 599 dir,
599 MapfileGenerator.MS_LAYER_PREFIX + "barriers-lines", 600 MapfileGenerator.MS_LAYER_PREFIX + "barriers-lines",
600 WSPLGEN_BARRIERS_LINES, 601 WSPLGEN_BARRIERS_LINES,
601 "LINE", 602 "LINE",
602 srid, 603 srid,
603 "barriers"); 604 MapfileGenerator.MS_BARRIERS_PREFIX);
604 605
605 if (scenario.equals(WSPLGENJob.GEL_NOSPERRE)) { 606 if (scenario.equals(WSPLGENJob.GEL_NOSPERRE)) {
606 logger.debug("WSPLGEN will not use barrier features."); 607 logger.debug("WSPLGEN will not use barrier features.");
607 } 608 }
608 else { 609 else {
622 "Write shapefile path into WSPLGEN job."); 623 "Write shapefile path into WSPLGEN job.");
623 createMapfile( 624 createMapfile(
624 artifact, 625 artifact,
625 dir, 626 dir,
626 MapfileGenerator.MS_LAYER_PREFIX + "barriers-poly", 627 MapfileGenerator.MS_LAYER_PREFIX + "barriers-poly",
627 shapePolys.getAbsolutePath(), 628 WSPLGEN_BARRIERS_POLY,
628 "POLYGON", 629 "POLYGON",
629 srid, 630 srid,
630 "barriers"); 631 MapfileGenerator.MS_BARRIERS_PREFIX);
631 632
632 if (scenario.equals(WSPLGENJob.GEL_NOSPERRE)) { 633 if (scenario.equals(WSPLGENJob.GEL_NOSPERRE)) {
633 logger.debug("WSPLGEN will not use barrier features."); 634 logger.debug("WSPLGEN will not use barrier features.");
634 } 635 }
635 else { 636 else {

http://dive4elements.wald.intevation.org