Giter VIP home page Giter VIP logo

gdal2tilesp's People

Contributors

bolshoydi avatar kleggerkoder avatar pramsey avatar roblabs avatar vmx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gdal2tilesp's Issues

Error on centos 7 with vrt (jp2)

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?

python freezes on windows

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 .

  • i've tried python 2.7.10 x32 and python 2.7.10 x64

Missing tiles at some zoom levels

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

Enhancements from Stack Overflow

http://gis.stackexchange.com/questions/207166/how-to-add-alpha-chanel-to-mbtiles-in-gdal-translate/207368?noredirect=1#comment315138_207368

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. 

Feature to skip partial tiles

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.