comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java @ 8554:3a0522f1a532

Morphological width imported and stored with heights is redundant to table morphologic_width.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 16 Feb 2015 09:00:08 +0100
parents 856701739443
children
comparison
equal deleted inserted replaced
8553:17c476e90c07 8554:3a0522f1a532
15 extends BedHeightData 15 extends BedHeightData
16 { 16 {
17 protected Integer year; 17 protected Integer year;
18 protected TDoubleArrayList data_gap; 18 protected TDoubleArrayList data_gap;
19 protected TDoubleArrayList soundingWidth; 19 protected TDoubleArrayList soundingWidth;
20 protected TDoubleArrayList width;
21 20
22 public BedHeightSingleData() { 21 public BedHeightSingleData() {
23 super(); 22 super();
24 data_gap = new TDoubleArrayList(); 23 data_gap = new TDoubleArrayList();
25 soundingWidth = new TDoubleArrayList(); 24 soundingWidth = new TDoubleArrayList();
26 width = new TDoubleArrayList();
27 } 25 }
28 26
29 public BedHeightSingleData(String name) { 27 public BedHeightSingleData(String name) {
30 super(name); 28 super(name);
31 data_gap = new TDoubleArrayList(); 29 data_gap = new TDoubleArrayList();
32 soundingWidth = new TDoubleArrayList(); 30 soundingWidth = new TDoubleArrayList();
33 width = new TDoubleArrayList();
34 } 31 }
35 32
36 public void add( 33 public void add(
37 double value, 34 double value,
38 double station, 35 double station,
39 double gap, 36 double gap,
40 double sounding, 37 double sounding,
41 double width,
42 Integer year 38 Integer year
43 ) { 39 ) {
44 super.add(value, station); 40 super.add(value, station);
45 if (year != null) { 41 if (year != null) {
46 this.year = year; 42 this.year = year;
47 } 43 }
48 this.data_gap.add(gap); 44 this.data_gap.add(gap);
49 this.soundingWidth.add(sounding); 45 this.soundingWidth.add(sounding);
50 this.width.add(width);
51 } 46 }
52 47
53 public Integer getYear() { 48 public Integer getYear() {
54 return this.year; 49 return this.year;
55 } 50 }
74 69
75 public double[] getSoundingWidths() { 70 public double[] getSoundingWidths() {
76 return this.soundingWidth.toNativeArray(); 71 return this.soundingWidth.toNativeArray();
77 } 72 }
78 73
79 public double getWidth(int ndx) {
80 return width.getQuick(ndx);
81 }
82
83 public double getWidth(double station) {
84 int ndx = this.station.indexOf(station);
85 if (ndx < 0) {
86 return Double.NaN;
87 }
88 return width.get(ndx);
89 }
90 } 74 }

http://dive4elements.wald.intevation.org