roblabs / gdal2tilesp Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pramsey/gdal2tilesp
Enhancements to tile cutter for parallelism and image format support
License: Other
This project forked from pramsey/gdal2tilesp
Enhancements to tile cutter for parallelism and image format support
License: Other
I'm processing a .vrt created from a .jp2 file. On Ubuntu it works, but on Centos 7 it throws the error:
Traceback (most recent call last):
File "/home/centos/gdal2tilesp.py", line 2759, in <module>
total = queue.get(timeout=1)
File "/usr/lib64/python2.7/multiprocessing/queues.py", line 132, in get
raise Empty
Queue.Empty
I can process tif files without issue. I can also use gdalwarp on the vrt/jp2, so it would seem that it's not a driver issue.
I used yum to install :
yum install gdal gdal-devel gdal-python
Any ideas?
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 my_tiff.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 .
Seems parallel version of gdal2tiles produce missing tiles at some zoom levels:
Same as for this patch: https://trac.osgeo.org/gdal/ticket/4379
Code I used for tile generation:
set -x # Dump each line of this script
set -e # Stop on first error
LEVELS_OF_DETAIL=19
GDAL_TO_TILES="/usr/bin/python gdal2tiles_v4.py --processes=`nproc`"
mkdir -p maps
rm -f maps/*.vrt
rm -f maps/*.tif
gdalbuildvrt -srcnodata "0,0,0" maps/global_ortho.vrt chunks/*/orthophoto_*.tif
$GDAL_TO_TILES -o tms -z 0-$LEVELS_OF_DETAIL maps/global_ortho.vrt maps/orthotiles
rm -f maps/*.vrt
rm -f maps/*.tif
I've edited some lines:
* I changed tileSize from 512 to 256.
* In worker_base_tiles i removed zoom_limits.put(gdal2tiles.tminz) and tmaxz, because in main at 2601 line queue became empty and thrown me an error.
* I've changed tminz\tmaxz = gdal2tiles.tminz\tmaxz. i didn't find reason to use put method, because in main you initiate GDAL2Tiles class which has tminz and tmaxz parameters.
What would it take to skip edge tiles that are partially blank (and fully blank)?
I'm trying to tile many tifs that overlap, and I don't see how I can get full tiles in the overlap areas. Merging tifs won't work, because the output file will be terabytes in size.
The original gdal2tiles (https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/scripts/gdal2tiles.py) has a part to skip fully blank tiles, but I haven't figured out how to detect partial tiles and implement it into gdal2tilesp yet.
alpha = alphaband.ReadRaster(rx, ry, rxsize, rysize, wxsize, wysize)
# Detect totally transparent tile and skip its creation
if tile_job_info.exclude_transparent and len(alpha) == alpha.count('\x00'.encode('ascii')):
return
data = ds.ReadRaster(rx, ry, rxsize, rysize, wxsize, wysize,
band_list=list(range(1, dataBandsCount + 1)))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.