本文整理汇总了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")