2

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.

1 Answer 1

1

I think there's a restriction on including VRTs within another VRT because it'll complicate the parsing code, I'm sure I read it on the gdal-dev mailing list, but I can't find the post at the moment. But one solution is that you can dispense with the first gdalbuildvrt and use gdal_translate directly:

gdal_translate -of VRT -b 1 -b 1 -b 1 A.TOC data.vrt

Which will duplicate all your sources for each band. I've tried this with a single GeoTIFF, and not with CIB data, but AFAIK the A.TOC file can be considered a single raster from a GDAL point of view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.