add arg to skip download
This commit is contained in:
parent
923d868c85
commit
299639f1e8
|
@ -25,6 +25,7 @@ if __name__ == '__main__':
|
|||
parser.add_argument('--tiff-threads', default=None, help='Number of threads to use when building TIFF. Default: auto')
|
||||
parser.add_argument('--output-tiff', help='Path for output GeoTIFF. Default: wmts-output/output.tiff')
|
||||
parser.add_argument('--bbox', required=True, type=str, metavar='Bounding Box', nargs='+', default=(None, None, None, None), help='Bounding Box of the area to download. Separate each value with a space. (top left lat, top left lon, bottom right lat, bottom right lon)')
|
||||
parser.add_argument('--no-download', action='store_true', help="Don't do any downloading or image checking.")
|
||||
args = parser.parse_args()
|
||||
|
||||
args.base_url = args.base_url.strip('/') + f'/{args.zoom}/'
|
||||
|
@ -59,6 +60,10 @@ if __name__ == '__main__':
|
|||
for row in row_iter:
|
||||
row_i = row
|
||||
col_iter = range(min_col, max_col + 1)
|
||||
if args.no_download:
|
||||
for col in col_iter:
|
||||
tiles.append((row, col))
|
||||
else:
|
||||
col_bar = tqdm(total=len(col_iter), leave=False)
|
||||
with (ThreadPoolExecutor(args.threads) as executor):
|
||||
futures = [executor.submit(download_tile, (row, col, args.base_url, r_headers, tiles_output, args.proxy)) for col in col_iter]
|
||||
|
|
Loading…
Reference in New Issue