Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.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 | ed237d6e8e27 |
children | 14d19313268a |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.java Mon Mar 04 17:08:14 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.java Mon Mar 04 17:11:31 2013 +0100 @@ -84,13 +84,19 @@ protected void doRiverAxisInfo(River river) { - List<RiverAxis> axis = RiverAxis.getRiverAxis(river.getName()); - if (axis != null && axis.size() > 0) { - logger.debug("TODO: Compute length and boundary."); + try { + List<RiverAxis> axis = RiverAxis.getRiverAxis(river.getName()); + if (axis != null && axis.size() > 0) { + logger.debug("TODO: Compute length and boundary."); + } + else { + logger.warn("River has no RiverAxis."); + } } - else { - logger.warn("River has no RiverAxis."); + catch(RuntimeException e) { + return; } + }