Mercurial > dive4elements > river
changeset 7834:b2a8a94a92f9 minfo-opt
Draw lines with gaps for sounding width, and bed heights.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 03 Apr 2014 14:10:53 +0200 |
parents | f97162606fa2 |
children | 35094b6bacf4 6bb44f053952 |
files | artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java |
diffstat | 2 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java Thu Apr 03 14:01:01 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java Thu Apr 03 14:10:53 2014 +0200 @@ -86,23 +86,32 @@ 1d); } else if (data instanceof BedHeightSingleData) { BedHeightSingleData bData = (BedHeightSingleData)data; - double[] heights = bData.getHeights(); - double[] stations = bData.getStations().toNativeArray(); + double[][] points = new double[][] + {bData.getStations().toNativeArray(), bData.getHeights()}; logger.debug("doBedheightSingleOut"); - - for (int i = 0; i < heights.length; i++) { - series.add(stations[i], heights[i], false); - } + StyledSeriesBuilder.addPointsFactorY(series, + points, + false, + GAP_TOLERANCE, + 1d); } else if (data instanceof List<?>) { List<BedHeightSingleValue> bData = (List<BedHeightSingleValue>)data; + double[][] points = new double[2][]; logger.debug("doBedheightSingleValueOut"); - for(BedHeightSingleValue bvalue: bData) { - series.add(bvalue.getStation(), bvalue.getHeight()); + for(int i = 0; i < bData.size(); i++) { + BedHeightSingleValue bvalue = bData.get(i); + points[0][i] = bvalue.getStation(); + points[1][i] = bvalue.getHeight(); } + StyledSeriesBuilder.addPointsFactorY(series, + points, + false, + GAP_TOLERANCE, + 1d); } else { logger.error("Unknown data type " + data.getClass());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Thu Apr 03 14:01:01 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Thu Apr 03 14:10:53 2014 +0200 @@ -52,7 +52,11 @@ if (facetName.equals(FacetTypes.BED_DIFFERENCE_SOUNDING_WIDTH) && data instanceof BedDiffYearResult) { BedDiffYearResult bData = (BedDiffYearResult) data; - StyledSeriesBuilder.addPoints(series, bData.getSoundingWidthData(), true); + StyledSeriesBuilder.addPoints( + series, + bData.getSoundingWidthData(), + false, + 0.110d); } else if (facetName.equals(FacetTypes.BED_DIFFERENCE_MORPH_WIDTH1) && data instanceof BedDiffYearResult) { BedDiffYearResult bData = (BedDiffYearResult) data;