Ejemplo n.º 1
0
def extend_pipes_00(in_pipe_path, dist='20.0'):
    """Extends individual culvert lines at each end.

    The culvert lines in the original files don't always extend across the
    road fill area on the DEM.

    Parameters
    -----------
    in_pipe_path: str
        Path to pipe file.
    dist: str, optional
        Distance to extend each line in both directions.

    Returns
    -------
    output_path: str

    """
    from WBT.whitebox_tools import WhiteboxTools

    wbt = WhiteboxTools()

    output_path = new_file_00(in_pipe_path, "XTPIPE", "shp")
    wbt.extend_vector_lines(in_pipe_path, output_path, dist)

    return output_path
Ejemplo n.º 2
0
def extend_pipes_00(in_pipe_path, dist='10.0'):
    """ Extend individual culvert lines at each end, by the specified distance.
    Parameters
    ----------
    in_pipe_path : str
        Path to pipe file
    dist : str
        Distance to extend each line in both directions
    """

    from WBT.whitebox_tools import WhiteboxTools
    wbt = WhiteboxTools()

    output_path = out_file_00(in_pipe_path, "XTPIPE", "shp")
    wbt.extend_vector_lines(in_pipe_path, output_path, dist)

    return output_path