Python osgeo.gdal.TermProgress_nocb() Examples

The following are 7 code examples of osgeo.gdal.TermProgress_nocb(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module osgeo.gdal , or try the search function .
Example #1
Source Project: gdal2tiles-leaflet   Author: commenthol   File: gdal2tiles.py    License: MIT License 5 votes vote down vote up
def progressbar(self, complete=0.0):
        """Print progressbar for float value 0..1"""

        gdal.TermProgress_nocb(complete)

    # ------------------------------------------------------------------------- 
Example #2
Source Project: gdal2tiles-leaflet   Author: commenthol   File: gdal2tiles-multiprocess.py    License: MIT License 5 votes vote down vote up
def progressbar(self, complete=0.0):
        """Print progressbar for float value 0..1"""

        gdal.TermProgress_nocb(complete)

    # ------------------------------------------------------------------------- 
Example #3
Source Project: gdal2cesium   Author: giohappy   File: gdal2cesium.py    License: GNU General Public License v2.0 5 votes vote down vote up
def progressbar(self, complete = 0.0):
        """Print progressbar for float value 0..1"""

        gdal.TermProgress_nocb(complete)

    # ------------------------------------------------------------------------- 
Example #4
Source Project: FloodMapsWorkshop   Author: vightel   File: hand_floodfill.py    License: Apache License 2.0 5 votes vote down vote up
def progressbar(self, complete = 0.0):
		gdal.TermProgress_nocb(complete)
		
	#
	# Save Data
	# 
Example #5
Source Project: FloodMapsWorkshop   Author: vightel   File: hand.py    License: Apache License 2.0 5 votes vote down vote up
def progressbar(self, complete = 0.0):
		gdal.TermProgress_nocb(complete)

	#
	# Save Data
	# 
Example #6
Source Project: geopackage-python   Author: GitHubRGI   File: gdal2tiles_parallel.py    License: GNU General Public License v3.0 5 votes vote down vote up
def progressbar(self, complete=0.0):
        """Print progressbar for float value 0..1"""

        gdal.TermProgress_nocb(complete)

    # ------------------------------------------------------------------------- 
Example #7
Source Project: geopackage-python   Author: GitHubRGI   File: gdal2tiles_parallel.py    License: GNU General Public License v3.0 4 votes vote down vote up
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")