cumulative_density_function_global.py
def calculate_percentiles(
        raster_path, percentile_list, target_percentile_pickle_path):
    """Calculate percentiles and save to a pickle file.

    Parameters:
        raster_path (str): path to raster.
        percentile_list (list): list of increasing order percentile thresholds
            between the ranges 0-100.
        target_percentile_pickle_path (str): the result of the percentile
            function will be saved in a list that is pickled in this file.

    Returns:
        None.

    """
    working_dir = os.path.dirname(target_percentile_pickle_path)
    heapfile_dir = tempfile.mkdtemp(dir=working_dir)
    percentile_values = pygeoprocessing.raster_band_percentile(
        (raster_path, 1), heapfile_dir, percentile_list)
    with open(target_percentile_pickle_path, 'wb') as pickle_file:
        pickle.dump(percentile_values, pickle_file)
    shutil.rmtree(heapfile_dir)
Calculate percentiles and save to a pickle file.

    Parameters:
        raster_path (str): path to raster.
        percentile_list (list): list of increasing order percentile thresholds
            between the ranges 0-100.
        target_percentile_pickle_path (str): the result of the percentile
            function will be saved in a list that is pickled in this file.

    Returns:
        None.

    
Calculate percentiles and save to a pickle file.
Calculate percentiles and save to a pickle file .
def calculate_percentiles(
        raster_path, percentile_list, target_percentile_pickle_path):
    working_dir = os.path.dirname(target_percentile_pickle_path)
    heapfile_dir = tempfile.mkdtemp(dir=working_dir)
    percentile_values = pygeoprocessing.raster_band_percentile(
        (raster_path, 1), heapfile_dir, percentile_list)
    with open(target_percentile_pickle_path, 'wb') as pickle_file:
        pickle.dump(percentile_values, pickle_file)
    shutil.rmtree(heapfile_dir)
def calculate_percentiles ( raster_path , percentile_list , target_percentile_pickle_path ) : working_dir = os . path . dirname ( target_percentile_pickle_path ) heapfile_dir = tempfile . mkdtemp ( dir = working_dir ) percentile_values = pygeoprocessing . raster_band_percentile ( ( raster_path , 1 ) , heapfile_dir , percentile_list ) with open ( target_percentile_pickle_path , 'wb' ) as pickle_file : pickle . dump ( percentile_values , pickle_file ) shutil . rmtree ( heapfile_dir )
Calculate percentiles and save to a pickle file.
Calculate percentiles and save to a pickle file .
"""Calculate percentiles and save to a pickle file.

    Parameters:
        raster_path (str): path to raster.
        percentile_list (list): list of increasing order percentile thresholds
            between the ranges 0-100.
        target_percentile_pickle_path (str): the result of the percentile
            function will be saved in a list that is pickled in this file.

    Returns:
        None.

    """
None
raster_path
path to raster.
path to raster .
percentile_list
list of increasing order percentile thresholds
between the ranges 0-100.
list of increasing order percentile thresholds between the ranges 0 - 100 .
target_percentile_pickle_path
the result of the percentile
function will be saved in a list that is pickled in this file.
the result of the percentile function will be saved in a list that is pickled in this file .