fill_lat_lng_nodata.py
def sanitize_raster(base_raster_path, target_raster_path):
    """Scrub base raster of any non-finite values to nodata.

    If noodata is None then scrub to 0.

    Args:
        base_raster_path (str): path to base raster
        target_raster_path (str): path to target raster

    Return:
        None.
    """
    raster_info = pygeoprocessing.get_raster_info(
        base_raster_path)
    fill_value = raster_info['nodata'][0]
    if fill_value is None:
        fill_value = 0
    pygeoprocessing.raster_calculator(
        [(base_raster_path, 1), (fill_value, 'raw')], _non_finite_to_fill_op,
        target_raster_path, raster_info['datatype'],
        raster_info['nodata'][0])
Scrub base raster of any non-finite values to nodata.

    If noodata is None then scrub to 0.

    Args:
        base_raster_path (str): path to base raster
        target_raster_path (str): path to target raster

    Return:
        None.
    
Scrub base raster of any non-finite values to nodata.
If noodata is None then scrub to 0.
Scrub base raster of any non - finite values to nodata . If noodata is None then scrub to 0 .
def sanitize_raster(base_raster_path, target_raster_path):
    raster_info = pygeoprocessing.get_raster_info(
        base_raster_path)
    fill_value = raster_info['nodata'][0]
    if fill_value is None:
        fill_value = 0
    pygeoprocessing.raster_calculator(
        [(base_raster_path, 1), (fill_value, 'raw')], _non_finite_to_fill_op,
        target_raster_path, raster_info['datatype'],
        raster_info['nodata'][0])
def sanitize_raster ( base_raster_path , target_raster_path ) : raster_info = pygeoprocessing . get_raster_info ( base_raster_path ) fill_value = raster_info [ 'nodata' ] [ 0 ] if fill_value is None : fill_value = 0 pygeoprocessing . raster_calculator ( [ ( base_raster_path , 1 ) , ( fill_value , 'raw' ) ] , _non_finite_to_fill_op , target_raster_path , raster_info [ 'datatype' ] , raster_info [ 'nodata' ] [ 0 ] )
Scrub base raster of any non-finite values to nodata.
Scrub base raster of any non - finite values to nodata .
"""Scrub base raster of any non-finite values to nodata.

    If noodata is None then scrub to 0.

    Args:
        base_raster_path (str): path to base raster
        target_raster_path (str): path to target raster

    Return:
        None.
    """
base_raster_path
path to base raster
path to base raster
target_raster_path
path to target raster
path to target raster