本文整理匯總了Python中osgeo.gdal.TermProgress_nocb方法的典型用法代碼示例。如果您正苦於以下問題:Python gdal.TermProgress_nocb方法的具體用法?Python gdal.TermProgress_nocb怎麽用?Python gdal.TermProgress_nocb使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類osgeo.gdal
的用法示例。
在下文中一共展示了gdal.TermProgress_nocb方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: progressbar
# 需要導入模塊: from osgeo import gdal [as 別名]
# 或者: from osgeo.gdal import TermProgress_nocb [as 別名]
def progressbar(self, complete=0.0):
"""Print progressbar for float value 0..1"""
gdal.TermProgress_nocb(complete)
# -------------------------------------------------------------------------
示例2: progressbar
# 需要導入模塊: from osgeo import gdal [as 別名]
# 或者: from osgeo.gdal import TermProgress_nocb [as 別名]
def progressbar(self, complete = 0.0):
"""Print progressbar for float value 0..1"""
gdal.TermProgress_nocb(complete)
# -------------------------------------------------------------------------
示例3: progressbar
# 需要導入模塊: from osgeo import gdal [as 別名]
# 或者: from osgeo.gdal import TermProgress_nocb [as 別名]
def progressbar(self, complete = 0.0):
gdal.TermProgress_nocb(complete)
#
# Save Data
#
示例4: progressbar
# 需要導入模塊: from osgeo import gdal [as 別名]
# 或者: from osgeo.gdal import TermProgress_nocb [as 別名]
def progressbar(self, complete = 0.0):
gdal.TermProgress_nocb(complete)
#
# Save Data
#
示例5: main
# 需要導入模塊: from osgeo import gdal [as 別名]
# 或者: from osgeo.gdal import TermProgress_nocb [as 別名]
def main(argv=None):
argv = gdal.GeneralCmdLineProcessor(sys_argv)
if argv:
gdal2tiles = GDAL2Tiles(argv[1:]) # handle command line options
print("Begin metadata generation complete.")
p = Process(target=worker_metadata, args=[argv])
p.start()
p.join()
print("Metadata generation complete.")
pool = Pool()
#processed_tiles = 0
print("Generating Base Tiles:")
for cpu in range(gdal2tiles.options.processes):
pool.apply_async(worker_base_tiles,
[argv, cpu],
callback=worker_callback)
pool.close()
# This progress code does not work. The queue deadlocks the pool.join() call.
#while len(active_children()) != 0:
# try:
# total = queue.get(timeout=1)
# processed_tiles += 1
# gdal.TermProgress_nocb(processed_tiles / float(total))
# stdout.flush()
# except:
# pass
pool.join()
print("Base tile generation complete.")
#processed_tiles = 0
tminz, tmaxz = getZooms(gdal2tiles)
print("Generating Overview Tiles:")
for tz in range(tmaxz - 1, tminz - 1, -1):
print("\tGenerating for zoom level: " + str(tz))
pool = Pool()
for cpu in range(gdal2tiles.options.processes):
pool.apply_async(worker_overview_tiles, [argv, cpu, tz])
pool.close()
#while len(active_children()) != 0:
# try:
# total = queue.get(timeout=1)
# processed_tiles += 1
# gdal.TermProgress_nocb(processed_tiles / float(total))
# stdout.flush()
# except:
# pass
pool.join()
print("\tZoom level " + str(tz) + " complete.")
print("Overview tile generation complete")