Example #1
0
    out_edge = args.out_edge
    out_dir = args.out_dir
    out_fmt = args.out_fmt
    edge_filter = args.edge_filter
    channel = args.channel
    touzi_xradius = args.touzi_xradius
    touzi_yradius = args.touzi_yradius

    # Set up logger
    handler_level = 'INFO'
    log_file = args.log_file
    log_dir = args.log_dir
    if not log_file:
        if not log_dir:
            log_dir = os.path.dirname(out_edge)
        log_file = create_logfile_path(Path(__file__).stem, logdir=log_dir)

    logger = create_logger(__name__,
                           'fh',
                           handler_level='DEBUG',
                           filename=args.log_file)

    # Run EdgeExtraction
    otb_edge_extraction(img=image_source,
                        out_edge=out_edge,
                        out_dir=out_dir,
                        out_fmt=out_fmt,
                        edge_filter=edge_filter,
                        channel=channel,
                        touzi_xradius=touzi_xradius,
                        touzi_yradius=touzi_yradius)
Example #2
0
    image = args.image_input
    dem = args.dem_input
    dem_prev = args.previous_dem
    project_dir = args.project_dir
    aoi = args.aoi
    config = args.config
    pansh_img = args.pansharpened_img
    skip_steps = args.skip_steps
    logdir = args.logdir

    if logdir:
        if not os.path.exists(logdir):
            os.makedirs(logdir)
        logger = create_logger(
            'obia_utils.cleanup_objects', 'fh', 'INFO',
            create_logfile_path(Path(__file__).name, logdir))
        logger = create_logger(
            'obia_utils.otb_grm', 'fh', 'INFO',
            create_logfile_path(Path(__file__).name, logdir))
        logger = create_logger(
            'obia_utils.ImageObjects', 'fh', 'INFO',
            create_logfile_path(Path(__file__).name, logdir))
        logger = create_logger(
            'classify_rts', 'fh', 'DEBUG',
            create_logfile_path(Path(__file__).name, logdir))
        logger = create_logger(
            __name__, 'fh', 'DEBUG',
            create_logfile_path(Path(__file__).name, logdir))

    if not config:
        config = Path(project_dir) / 'config.json'