コード例 #1
0
ファイル: orthophoto.py プロジェクト: MobileScientists/ODM
def post_orthophoto_steps(args, bounds_file_path, orthophoto_file,
                          orthophoto_tiles_dir):
    if args.crop > 0 or args.boundary:
        Cropper.crop(bounds_file_path,
                     orthophoto_file,
                     get_orthophoto_vars(args),
                     keep_original=not args.optimize_disk_space,
                     warp_options=['-dstalpha'])

    if args.build_overviews and not args.cog:
        build_overviews(orthophoto_file)

    if args.orthophoto_png:
        generate_png(orthophoto_file)

    if args.orthophoto_kmz:
        generate_kmz(orthophoto_file)

    if args.tiles:
        generate_orthophoto_tiles(orthophoto_file, orthophoto_tiles_dir,
                                  args.max_concurrency)

    if args.cog:
        convert_to_cogeo(orthophoto_file,
                         max_workers=args.max_concurrency,
                         compression=args.orthophoto_compression)
コード例 #2
0
def post_orthophoto_steps(args, bounds_file_path, orthophoto_file,
                          orthophoto_tiles_dir):
    if args.crop > 0:
        Cropper.crop(bounds_file_path,
                     orthophoto_file,
                     get_orthophoto_vars(args),
                     keep_original=not args.optimize_disk_space,
                     warp_options=['-dstalpha'])

    if args.build_overviews:
        build_overviews(orthophoto_file)

    if args.orthophoto_png:
        generate_png(orthophoto_file)

    if args.tiles:
        generate_orthophoto_tiles(orthophoto_file, orthophoto_tiles_dir,
                                  args.max_concurrency)