code: public double getLinkSlope() {
          if ((int) linkSlope == -1) {
              // hillslopeFeature.getAttribute(baricenterElevationAttribute);
              double startElev = (Double) linkFeature.getAttribute(NetworkChannel.STARTELEVNAME);
              double endElev = (Double) linkFeature.getAttribute(NetworkChannel.ENDELEVNAME);
              linkSlope = (startElev - endElev) / getLinkLength();
  
              if (linkSlope <= 0) {
                  /*
                   * if < 0 then probably it is very flat and the dem si not precise. The slope is
                   * set.
                   */
                  linkSlope = 0.001;
              }
          }
          return linkSlope;
      }
docs: /* (non-Javadoc)
  @see org.hortonmachine.hmachine.modules.hydrogeomorphology.adige.core.IHillSlope#getLinkSlope()