comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 2102:16e74c5e636f

Cosmetics. flys-artifacts/trunk@3659 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 12 Jan 2012 12:20:56 +0000
parents d13be39cfd1d
children 51b9899f819d
comparison
equal deleted inserted replaced
2101:d54518bac974 2102:16e74c5e636f
655 return Segment.parseSegments(input); 655 return Segment.parseSegments(input);
656 } 656 }
657 657
658 658
659 /** 659 /**
660 * Get List of all cross-sections for current river.
661 *
662 * @return List of CrossSections for current river, null in case of error.
663 */
664 protected List<CrossSection> getCrossSections() {
665 River river = FLYSUtils.getRiver(this);
666 if (river == null) {
667 logger.warn("No river in WINFO found");
668 return null;
669 }
670 return CrossSectionFactory.getCrossSections(river);
671 }
672
673
674 /**
675 * Get points of line describing the surface of water at cross section. 660 * Get points of line describing the surface of water at cross section.
676 * 661 *
677 * @return an array holding coordinates of points of surface of water ( 662 * @return an array holding coordinates of points of surface of water (
678 * in the form {{x1, x2} {y1, y2}} ). 663 * in the form {{x1, x2} {y1, y2}} ).
679 */ 664 */
717 } 702 }
718 last_w = triple.getW(i); 703 last_w = triple.getW(i);
719 old_dist_wish = diff; 704 old_dist_wish = diff;
720 } 705 }
721 return Lines.createWaterLines(points, last_w); 706 return Lines.createWaterLines(points, last_w);
722 }
723
724
725 /**
726 * Get name of cross sections.
727 * @return list of names of cross-sections.
728 */
729 public List<String> getCrossSectionNames() {
730 logger.debug("getCrossSectionNames");
731 List<String> names = new ArrayList<String>();
732
733 for (CrossSection section: getCrossSections()) {
734 names.add(section.getDescription());
735 }
736
737 return names;
738 } 707 }
739 708
740 709
741 /** 710 /**
742 * Returns the Qs for a number of Ws. This method makes use of 711 * Returns the Qs for a number of Ws. This method makes use of

http://dive4elements.wald.intevation.org