Example #1
0
def lidar_tile(region_name,
               resolution,
               tile_key,
               prefix='hag',
               version=1,
               return_profile=False):
    path = paths.lidar_tile(region_name,
                            resolution,
                            tile_key,
                            prefix=prefix,
                            version=version)
    return io.read(path, return_profile=return_profile)
Example #2
0
def get_input(path):
    im, p = io.read(path, return_profile=True)
    im = hand.process_input(im,
                            rotate=False,
                            flip=False,
                            input_bands=INPUT_BANDS,
                            band_indices=INDICES,
                            indices_dict=None,
                            padding=None,
                            padding_value=0,
                            cropping=CROPPING,
                            means=MEANS,
                            stdevs=STDEVS,
                            preprocess=None)
    return im, p
Example #3
0
def im_data(path=None, paths=None, key=None):
    if not path:
        path = get_path_with_key(paths, key)
    if path:
        im = io.read(path, return_profile=False)
        means, stdevs = stats(im)
        black_pixel_count = (im[:3].sum(axis=0) == 0).sum()
        shape = list(im.shape[1:])
    else:
        path = False
        means = None
        stdevs = None
        black_pixel_count = None
        shape = None
        im = None
    return path, means, stdevs, black_pixel_count, shape, im