Friday 1 March 2019

Converting CIB data to Google Tiles with GDAL


I'm trying to convert CIB map data into Google compatible Tiles through the following process (in Linux, GDAL compiled from source):


gdalbuildvrt data.vrt A.TOC
gdal_translate -of VRT -expand rgba data.vrt data2.vrt
mkdir data
gdal2tiles.py data2.vrt data

gdal2tiles.py gives the following error:




Generating Base Tiles: ERROR 1: VRTSourcedRasterBand::IRasterIO() called recursively on the same band. It looks like the VRT is refe
rencing itself. ERROR 1: IReadBlock failed at X offset 0, Y offset 0 ERROR 1: VRTSourcedRasterBand::IRasterIO() called recursively on the same band. It looks like the VRT is refe
rencing itself. ERROR 1: IReadBlock failed at X offset 0, Y offset 0 Traceback (most recent call last):
File "/usr/local/bin/gdal2tiles.py", line 2241, in ? gdal2tiles.process() File "/usr/local/bin/gdal2tiles.py", line 478, in process self.generate_base_tiles() File "/usr/local/bin/gdal2tiles.py", line 1276, in generate_base_tiles dsquery.WriteRaster(wx, wy, wxsize, wysize, data, band_list=list(range(1,self.dataBandsCount+1))) File "/usr/lib/python2.4/site-packages/GDAL-1.8.0-py2.4-linux-i686.egg/osgeo/gdal.py", line 746, in WriteRa
ster buf_pixel_space, buf_line_space, buf_band_space ) TypeError: not a string



I know my CIB data source is valid, am I missing an obvious step? Is this a user error or a bug in the GDAL software? Thanks so much for any help/opinions.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...