当前位置: 首页>>代码示例>>Python>>正文


Python gdal.TermProgress_nocb方法代码示例

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

    # ------------------------------------------------------------------------- 
开发者ID:commenthol,项目名称:gdal2tiles-leaflet,代码行数:8,代码来源:gdal2tiles.py

示例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)

    # ------------------------------------------------------------------------- 
开发者ID:giohappy,项目名称:gdal2cesium,代码行数:8,代码来源:gdal2cesium.py

示例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
	# 
开发者ID:vightel,项目名称:FloodMapsWorkshop,代码行数:8,代码来源:hand_floodfill.py

示例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
	# 
开发者ID:vightel,项目名称:FloodMapsWorkshop,代码行数:8,代码来源:hand.py

示例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") 
开发者ID:GitHubRGI,项目名称:geopackage-python,代码行数:53,代码来源:gdal2tiles_parallel.py


注:本文中的osgeo.gdal.TermProgress_nocb方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。