Mercurial > dive4elements > river
changeset 7899:8333b9b06c98 3.1.3
Return NaN for width if no width exists for the requested station in bedheights data.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 21 May 2014 17:03:02 +0200 |
parents | 447ff9126d1e |
children | af34cfbd7abc |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java Wed May 21 13:22:44 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java Wed May 21 17:03:02 2014 +0200 @@ -82,6 +82,9 @@ public double getWidth(double station) { int ndx = this.station.indexOf(station); + if (ndx < 0) { + return Double.NaN; + } return width.get(ndx); } }