0

I'm trying to read\load BigGeoTIFF multi-band raster (>4GB), using GDAL module in python but I can't seem to make it. At first the error was that BigGeoTIFF format is not supported by GDAL and libtiff versions, but according to this document I have the required versions. I also saw somewhere (can't find it now for some reason) that you need to specifically enable the BigGeoTIFF format in GDAL but I don't know how to do so. Anyways, now when I try to read the raster with:

source = r"C:\Users\Administrator\Desktop\california_merge.tif"
dataset = gdal.Open(source)
print type(dataset)
>>>NoneType

When I use this code on <4GB multi-band raster I get the desired result

source = r"C:\Users\Administrator\Desktop\california_merge_clip.tif"
dataset = gdal.Open(source)
print type(dataset)
>>>osgeo.gdal.Dataset

What can I do to be able to read (and later process) BigGeoTIFF file in Python (version 2.7 on win 10)

  • How much memory does your pc have? – Liam G Dec 22 '17 at 11:36
  • How many bands does BigGeotiff raster have? In this case, for reducing size, you can use gdal_translate command (by using -b parameter) to extract each individual band previously and try it out. – xunilk Dec 22 '17 at 13:40
  • 8GB, 4-band raster – user88484 Dec 23 '17 at 7:34
  • Please edit your question and specify what version of GDAL and where you installed it from. – user2856 Dec 23 '17 at 21:23
  • 3
2

I believe, you can check if BigTIFF is supported like this:

md = gdal.GetDriverByName('GTiff').GetMetadata()
if md['DMD_CREATIONOPTIONLIST'].find('BigTIFF') == -1:
    return 'BigTIFF is not supported'

You can also enable exceptions to see the reason why the image can't be read (gdal.Open() will raise an exception):

gdal.UseExceptions()
  • I ran this code and I got 'BigTIFF is not supported', I don't now how to enable it since I have the required version of 'gdal' and 'libtiff'. Is there any other module that supports BigGeoTiff? – user88484 Dec 23 '17 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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