code: private RiverPoint getNetworkPoint( LineString riverLine, RandomIter elevIter, GridGeometry2D gridGeometry,
              double progressiveDistance, Double ks, Coordinate leftPoint, Coordinate rightPoint ) throws TransformException {
          List<ProfilePoint> sectionPoints = CoverageUtilities.doProfile(elevIter, gridGeometry, rightPoint, leftPoint);
          List<Coordinate> coordinate3dList = new ArrayList<Coordinate>();
          for( ProfilePoint sectionPoint : sectionPoints ) {
              Coordinate position = sectionPoint.getPosition();
              position.z = sectionPoint.getElevation();
              coordinate3dList.add(position);
          }
          LineString sectionLine3d = gf.createLineString(coordinate3dList.toArray(new Coordinate[0]));
          Geometry crossPoint = sectionLine3d.intersection(riverLine);
          Coordinate coordinate = crossPoint.getCoordinate();
          if (coordinate == null) {
              return null;
          }
          int[] colRow = CoverageUtilities.colRowFromCoordinate(coordinate, gridGeometry, null);
          double elev = elevIter.getSampleDouble(colRow[0], colRow[1], 0);
          coordinate.z = elev;
          RiverPoint netPoint = new RiverPoint(coordinate, progressiveDistance, sectionLine3d, ks);
          return netPoint;
      }
docs: Extract a {@link RiverPoint}.
  
  @param riverLine the geometry of the main river.
  @param elevIter the elevation raster.
  @param gridGeometry the raster geometry.
  @param progressiveDistance the progressive distance along the main river.
  @param ks the KS for the section.
  @param leftPoint the left point of the section.
  @param rightPoint the right point of the section.
  @return the created {@link RiverPoint}.
  @throws TransformException