adjust default threading number, fix bar
This commit is contained in:
parent
d3d818a57e
commit
65e247dae6
|
@ -40,7 +40,7 @@ extent required about 400GB of memory. You can use swap for this, but don't expe
|
|||
route.
|
||||
|
||||
Be careful not to go overboard with your spatial extent. Use only what you need to avoid unnecessary processing time or
|
||||
else you will end up with a situation where it will take a week to download all the tiles and build a TIFF.
|
||||
else you will easily end up with a situation where it will take a week to download all the tiles and build a TIFF.
|
||||
|
||||
### ArcGIS
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import argparse
|
||||
import base64
|
||||
import os
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
from pathlib import Path
|
||||
|
@ -22,7 +23,7 @@ if __name__ == '__main__':
|
|||
parser.add_argument('--referer', help='The content of the Referer header to send.')
|
||||
parser.add_argument('--output', default='wmts-output', help='Output directory path.')
|
||||
parser.add_argument('--proxy', action='store_true', help='Enable using a proxy.')
|
||||
parser.add_argument('--tiff-threads', default=None, type=int, help='Number of threads to use when building TIFF. Default: auto')
|
||||
parser.add_argument('--tiff-threads', default=None, type=int, help=f'Number of threads to use when building TIFF. Default: {min(32, (os.cpu_count() or 1) + 4)}') # https://github.com/python/cpython/blob/3.10/Lib/concurrent/futures/thread.py#L142C27-L142C61
|
||||
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.")
|
||||
|
@ -153,6 +154,7 @@ if __name__ == '__main__':
|
|||
for future in as_completed(futures):
|
||||
bar.set_postfix()
|
||||
bar.update()
|
||||
bar.close()
|
||||
|
||||
# Transpose the image data array to the format (bands, rows, cols).
|
||||
print('Transposing...')
|
||||
|
|
Loading…
Reference in New Issue