roblabs / gdal2tilesp

Enhancements to tile cutter for parallelism and image format support
Other
20 stars 9 forks source link

python freezes on windows #2

Closed bolshoydi closed 8 years ago

bolshoydi commented 8 years ago

when tiling small .tiffs (about 100Mb) script works fine. when tiling big .tiffs (more 1Gb spatial resolution 0.7 meters) after generating base tiles all python.exe processes became freeze. No messages in console, no generating of new tiles. *resolution in 0.7 meters means 18 zoom level, so i use command _gdal2tilesp.py mytiff.tif -z 12-18 outfolder - and this command freezes python. But when i use less zoom leveles e.g. 16 script works till the end, but Windows throws me an error .

roblabs commented 8 years ago

@bolshoydi

Some ideas on what to try

gdal2tilesp.py -h

has this option

--processes=PROCESSES
                        Number of concurrent processes (defaults to the number
                        of cores in the system)

Install from https://hub.docker.com/r/geodata/gdal/

docker run -v $(pwd):/data geodata/gdal gdal2tiles.py
bolshoydi commented 8 years ago

I dropped queue and progressbar. I don't know the reason, but after queue.put(tcount), queue.qsize() return 0, (in python console i tested queue.put() and get() methods, they worked fine) and queue.get() doesn't work, so i wasn't unable to get tcount from generate_base_tiles thats why i dropped out progress bar. And i added pooli.wait(), where _pooli=pool.apply_async(worker_basetiles, [argv, cpu]), and pool.terminate() before pool.join(), because operations of tiling were completed (0 cpu usage) but the processes of python.exe in taskmanager weren't closed.

roblabs commented 8 years ago

Glad to see you have it working. All the code changes you made may have been done in the original http://gdal.org.