Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 5170:c1b60f8c3390
Made river mapfile generator more tolerant.
* Ignores missing river axes.
* Ignores invalid river axes.
* Ignores invalid geometries.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 04 Mar 2013 17:11:31 +0100 |
parents | b26465581abf |
children | 14d19313268a |
comparison
equal
deleted
inserted
replaced
5169:db1a000a21a9 | 5170:c1b60f8c3390 |
---|---|
614 | 614 |
615 protected void setAxis(FLYSArtifact artifact, File dir, WSPLGENJob job) { | 615 protected void setAxis(FLYSArtifact artifact, File dir, WSPLGENJob job) { |
616 String river = artifact.getDataAsString("river"); | 616 String river = artifact.getDataAsString("river"); |
617 String srid = FLYSUtils.getRiverDGMSrid(river); | 617 String srid = FLYSUtils.getRiverDGMSrid(river); |
618 String srs = "EPSG:" + srid; | 618 String srs = "EPSG:" + srid; |
619 logger.debug("srs: " + srs); | 619 |
620 List<RiverAxis> axes = RiverAxis.getRiverAxis(river); | 620 List<RiverAxis> axes = null; |
621 try { | |
622 axes = RiverAxis.getRiverAxis(river); | |
623 } | |
624 catch (RuntimeException e) { | |
625 return; | |
626 } | |
621 if (axes == null || axes.isEmpty()) { | 627 if (axes == null || axes.isEmpty()) { |
622 logger.warn("Could not find river axis for: '" + river + "'"); | 628 logger.warn("Could not find river axis for: '" + river + "'"); |
623 return; | 629 return; |
624 } | 630 } |
625 | 631 |