Mercurial > dive4elements > river
changeset 6359:e2b1057cee04
Skip calculation parameters if no bed diameter data exist in CSV exporter.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 18 Jun 2013 09:26:00 +0200 |
parents | e1093f75a36f |
children | d848c887683a |
files | artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Tue Jun 18 09:09:42 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Tue Jun 18 09:26:00 2013 +0200 @@ -122,6 +122,9 @@ row[ndx] = beds[k].getDiameterCap(km); row[ndx + 1] = beds[k].getDiameterSub(km); } + if (beds.length == 0) { + continue; + } BedParametersResult[] params = results[j].getParameters(); for(int k = 0; k < params.length; k++) { // loads.length + (beds.lenght * 2) * (j + 1): shift bed and bedload columns. @@ -203,6 +206,9 @@ beds[j].getType().toString()) + " - " + d1 + "-" + d2); } + if (beds.length == 0) { + continue; + } if (params.length > 0) { header.add( msg(CSV_HEADER_DENSITY_CAP, CSV_HEADER_DENSITY_CAP) +