RGB TIFF goes black when zoomed out in QGIS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4















Am importing a RGB TIFF into QGIS 3.4 and when I zoom in I can see the image properly, however, when I zoom out the layer turns black (most of it) and red (a small portion). After doing some search I found this, which suggests that this problem is caused by issues with pyramids and statistics with the layer. There is some support there but that is for ArcGIS. I tried building the pyramids in QGIS Raster-->Miscellaneous-->Build Overviews (Pyramids) (I have done it in the past for .asc files), but got the following error



ERROR 1: TIFFAppendToStrip:Maximum TIFF file size exceeded. Use BIGTIFF=YES creation option.
ERROR 1: An error occurred while writing a dirty block from GDALRasterBand::RasterIO


Does anyone know how I could to build pyramids for a TIFF in QGIS?



If so, what "Overview levels" should I select?



Or does anyone know how to solve this issue for my RGB TIFF?










share|improve this question



















  • 2





    Can you use command line? If so use GDALAddO gdal.org/gdaladdo.html first with -clean to get rid of existing pyramids then use the same command with -ro so as not to internalize the pyramids. Depending on the size of your raster levels should be 4 8 16 32 64 but if very large add 128 256 to the levels. The problem comes from your GeoTIFF not being a large GeoTIFF and you're exceeding the 4GiB limit by internalizing your pyramids, specifying -ro will force GDALAddO to write the overviews to a separate file, thus not increasing your existing file size.

    – Michael Stimson
    Jan 16 at 3:33












  • @Michael Stimson, I think your comment is worthy of posting as an answer!

    – Ben W
    Jan 16 at 3:41















4















Am importing a RGB TIFF into QGIS 3.4 and when I zoom in I can see the image properly, however, when I zoom out the layer turns black (most of it) and red (a small portion). After doing some search I found this, which suggests that this problem is caused by issues with pyramids and statistics with the layer. There is some support there but that is for ArcGIS. I tried building the pyramids in QGIS Raster-->Miscellaneous-->Build Overviews (Pyramids) (I have done it in the past for .asc files), but got the following error



ERROR 1: TIFFAppendToStrip:Maximum TIFF file size exceeded. Use BIGTIFF=YES creation option.
ERROR 1: An error occurred while writing a dirty block from GDALRasterBand::RasterIO


Does anyone know how I could to build pyramids for a TIFF in QGIS?



If so, what "Overview levels" should I select?



Or does anyone know how to solve this issue for my RGB TIFF?










share|improve this question



















  • 2





    Can you use command line? If so use GDALAddO gdal.org/gdaladdo.html first with -clean to get rid of existing pyramids then use the same command with -ro so as not to internalize the pyramids. Depending on the size of your raster levels should be 4 8 16 32 64 but if very large add 128 256 to the levels. The problem comes from your GeoTIFF not being a large GeoTIFF and you're exceeding the 4GiB limit by internalizing your pyramids, specifying -ro will force GDALAddO to write the overviews to a separate file, thus not increasing your existing file size.

    – Michael Stimson
    Jan 16 at 3:33












  • @Michael Stimson, I think your comment is worthy of posting as an answer!

    – Ben W
    Jan 16 at 3:41













4












4








4








Am importing a RGB TIFF into QGIS 3.4 and when I zoom in I can see the image properly, however, when I zoom out the layer turns black (most of it) and red (a small portion). After doing some search I found this, which suggests that this problem is caused by issues with pyramids and statistics with the layer. There is some support there but that is for ArcGIS. I tried building the pyramids in QGIS Raster-->Miscellaneous-->Build Overviews (Pyramids) (I have done it in the past for .asc files), but got the following error



ERROR 1: TIFFAppendToStrip:Maximum TIFF file size exceeded. Use BIGTIFF=YES creation option.
ERROR 1: An error occurred while writing a dirty block from GDALRasterBand::RasterIO


Does anyone know how I could to build pyramids for a TIFF in QGIS?



If so, what "Overview levels" should I select?



Or does anyone know how to solve this issue for my RGB TIFF?










share|improve this question
















Am importing a RGB TIFF into QGIS 3.4 and when I zoom in I can see the image properly, however, when I zoom out the layer turns black (most of it) and red (a small portion). After doing some search I found this, which suggests that this problem is caused by issues with pyramids and statistics with the layer. There is some support there but that is for ArcGIS. I tried building the pyramids in QGIS Raster-->Miscellaneous-->Build Overviews (Pyramids) (I have done it in the past for .asc files), but got the following error



ERROR 1: TIFFAppendToStrip:Maximum TIFF file size exceeded. Use BIGTIFF=YES creation option.
ERROR 1: An error occurred while writing a dirty block from GDALRasterBand::RasterIO


Does anyone know how I could to build pyramids for a TIFF in QGIS?



If so, what "Overview levels" should I select?



Or does anyone know how to solve this issue for my RGB TIFF?







qgis qgis-3.0 rgb image-pyramids






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 22 at 23:46









PolyGeo

53.4k1780239




53.4k1780239










asked Jan 16 at 3:15









Juan OssaJuan Ossa

987




987







  • 2





    Can you use command line? If so use GDALAddO gdal.org/gdaladdo.html first with -clean to get rid of existing pyramids then use the same command with -ro so as not to internalize the pyramids. Depending on the size of your raster levels should be 4 8 16 32 64 but if very large add 128 256 to the levels. The problem comes from your GeoTIFF not being a large GeoTIFF and you're exceeding the 4GiB limit by internalizing your pyramids, specifying -ro will force GDALAddO to write the overviews to a separate file, thus not increasing your existing file size.

    – Michael Stimson
    Jan 16 at 3:33












  • @Michael Stimson, I think your comment is worthy of posting as an answer!

    – Ben W
    Jan 16 at 3:41












  • 2





    Can you use command line? If so use GDALAddO gdal.org/gdaladdo.html first with -clean to get rid of existing pyramids then use the same command with -ro so as not to internalize the pyramids. Depending on the size of your raster levels should be 4 8 16 32 64 but if very large add 128 256 to the levels. The problem comes from your GeoTIFF not being a large GeoTIFF and you're exceeding the 4GiB limit by internalizing your pyramids, specifying -ro will force GDALAddO to write the overviews to a separate file, thus not increasing your existing file size.

    – Michael Stimson
    Jan 16 at 3:33












  • @Michael Stimson, I think your comment is worthy of posting as an answer!

    – Ben W
    Jan 16 at 3:41







2




2





Can you use command line? If so use GDALAddO gdal.org/gdaladdo.html first with -clean to get rid of existing pyramids then use the same command with -ro so as not to internalize the pyramids. Depending on the size of your raster levels should be 4 8 16 32 64 but if very large add 128 256 to the levels. The problem comes from your GeoTIFF not being a large GeoTIFF and you're exceeding the 4GiB limit by internalizing your pyramids, specifying -ro will force GDALAddO to write the overviews to a separate file, thus not increasing your existing file size.

– Michael Stimson
Jan 16 at 3:33






Can you use command line? If so use GDALAddO gdal.org/gdaladdo.html first with -clean to get rid of existing pyramids then use the same command with -ro so as not to internalize the pyramids. Depending on the size of your raster levels should be 4 8 16 32 64 but if very large add 128 256 to the levels. The problem comes from your GeoTIFF not being a large GeoTIFF and you're exceeding the 4GiB limit by internalizing your pyramids, specifying -ro will force GDALAddO to write the overviews to a separate file, thus not increasing your existing file size.

– Michael Stimson
Jan 16 at 3:33














@Michael Stimson, I think your comment is worthy of posting as an answer!

– Ben W
Jan 16 at 3:41





@Michael Stimson, I think your comment is worthy of posting as an answer!

– Ben W
Jan 16 at 3:41










1 Answer
1






active

oldest

votes


















5














This error is because you're building pyramids internally (default) on a GeoTIFF file which is not a big TIFF. The pyramids are being appended to the existing file which makes the resultant file exceed the 4 GiB limit. This is evident by the error message Maximum TIFF file size exceeded.



From here you have some options, the error message indicates using BIGTIFF=YES which you can do from QGIS with Raster::Translate, writing a new file which can exceed the 4 GiB limit, for example this post describes the process.



Or if you're comfortable with the CMD tools you can attempt repair the existing TIFF file in a two step process:



  1. Remove the existing bad pyramids with GDALAddO -clean option. It is important to remove the existing internal pyramids before creating new external pyramids as this would create a conflict of which pyramids to use; I would think that the internal pyramids would take precedence but that's an assumption - I haven't tried this to prove which takes precedence.

  2. Create new external pyramids with GDALAddO -ro option which will force the creation of an OVR or RRD (–config USE_RRD YES) file to contain the pyramids. For most rasters levels of 4 8 16 32 64 (5 levels of pyramid) is sufficient but if your file is especially large use 4 8 16 32 64 128 256 to create 7 levels.

This may not work if the file is already too broken to fix, if this is the case your only option is to translate the file to a new raster.






share|improve this answer























  • Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

    – Juan Ossa
    Jan 21 at 6:59










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f308782%2frgb-tiff-goes-black-when-zoomed-out-in-qgis%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














This error is because you're building pyramids internally (default) on a GeoTIFF file which is not a big TIFF. The pyramids are being appended to the existing file which makes the resultant file exceed the 4 GiB limit. This is evident by the error message Maximum TIFF file size exceeded.



From here you have some options, the error message indicates using BIGTIFF=YES which you can do from QGIS with Raster::Translate, writing a new file which can exceed the 4 GiB limit, for example this post describes the process.



Or if you're comfortable with the CMD tools you can attempt repair the existing TIFF file in a two step process:



  1. Remove the existing bad pyramids with GDALAddO -clean option. It is important to remove the existing internal pyramids before creating new external pyramids as this would create a conflict of which pyramids to use; I would think that the internal pyramids would take precedence but that's an assumption - I haven't tried this to prove which takes precedence.

  2. Create new external pyramids with GDALAddO -ro option which will force the creation of an OVR or RRD (–config USE_RRD YES) file to contain the pyramids. For most rasters levels of 4 8 16 32 64 (5 levels of pyramid) is sufficient but if your file is especially large use 4 8 16 32 64 128 256 to create 7 levels.

This may not work if the file is already too broken to fix, if this is the case your only option is to translate the file to a new raster.






share|improve this answer























  • Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

    – Juan Ossa
    Jan 21 at 6:59















5














This error is because you're building pyramids internally (default) on a GeoTIFF file which is not a big TIFF. The pyramids are being appended to the existing file which makes the resultant file exceed the 4 GiB limit. This is evident by the error message Maximum TIFF file size exceeded.



From here you have some options, the error message indicates using BIGTIFF=YES which you can do from QGIS with Raster::Translate, writing a new file which can exceed the 4 GiB limit, for example this post describes the process.



Or if you're comfortable with the CMD tools you can attempt repair the existing TIFF file in a two step process:



  1. Remove the existing bad pyramids with GDALAddO -clean option. It is important to remove the existing internal pyramids before creating new external pyramids as this would create a conflict of which pyramids to use; I would think that the internal pyramids would take precedence but that's an assumption - I haven't tried this to prove which takes precedence.

  2. Create new external pyramids with GDALAddO -ro option which will force the creation of an OVR or RRD (–config USE_RRD YES) file to contain the pyramids. For most rasters levels of 4 8 16 32 64 (5 levels of pyramid) is sufficient but if your file is especially large use 4 8 16 32 64 128 256 to create 7 levels.

This may not work if the file is already too broken to fix, if this is the case your only option is to translate the file to a new raster.






share|improve this answer























  • Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

    – Juan Ossa
    Jan 21 at 6:59













5












5








5







This error is because you're building pyramids internally (default) on a GeoTIFF file which is not a big TIFF. The pyramids are being appended to the existing file which makes the resultant file exceed the 4 GiB limit. This is evident by the error message Maximum TIFF file size exceeded.



From here you have some options, the error message indicates using BIGTIFF=YES which you can do from QGIS with Raster::Translate, writing a new file which can exceed the 4 GiB limit, for example this post describes the process.



Or if you're comfortable with the CMD tools you can attempt repair the existing TIFF file in a two step process:



  1. Remove the existing bad pyramids with GDALAddO -clean option. It is important to remove the existing internal pyramids before creating new external pyramids as this would create a conflict of which pyramids to use; I would think that the internal pyramids would take precedence but that's an assumption - I haven't tried this to prove which takes precedence.

  2. Create new external pyramids with GDALAddO -ro option which will force the creation of an OVR or RRD (–config USE_RRD YES) file to contain the pyramids. For most rasters levels of 4 8 16 32 64 (5 levels of pyramid) is sufficient but if your file is especially large use 4 8 16 32 64 128 256 to create 7 levels.

This may not work if the file is already too broken to fix, if this is the case your only option is to translate the file to a new raster.






share|improve this answer













This error is because you're building pyramids internally (default) on a GeoTIFF file which is not a big TIFF. The pyramids are being appended to the existing file which makes the resultant file exceed the 4 GiB limit. This is evident by the error message Maximum TIFF file size exceeded.



From here you have some options, the error message indicates using BIGTIFF=YES which you can do from QGIS with Raster::Translate, writing a new file which can exceed the 4 GiB limit, for example this post describes the process.



Or if you're comfortable with the CMD tools you can attempt repair the existing TIFF file in a two step process:



  1. Remove the existing bad pyramids with GDALAddO -clean option. It is important to remove the existing internal pyramids before creating new external pyramids as this would create a conflict of which pyramids to use; I would think that the internal pyramids would take precedence but that's an assumption - I haven't tried this to prove which takes precedence.

  2. Create new external pyramids with GDALAddO -ro option which will force the creation of an OVR or RRD (–config USE_RRD YES) file to contain the pyramids. For most rasters levels of 4 8 16 32 64 (5 levels of pyramid) is sufficient but if your file is especially large use 4 8 16 32 64 128 256 to create 7 levels.

This may not work if the file is already too broken to fix, if this is the case your only option is to translate the file to a new raster.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 16 at 4:22









Michael StimsonMichael Stimson

21.3k22260




21.3k22260












  • Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

    – Juan Ossa
    Jan 21 at 6:59

















  • Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

    – Juan Ossa
    Jan 21 at 6:59
















Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

– Juan Ossa
Jan 21 at 6:59





Thanks a lot for this, I managed to solve the issue in both ways, by using a bigTiff but also using the command line. Thanks!

– Juan Ossa
Jan 21 at 6:59

















draft saved

draft discarded
















































Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f308782%2frgb-tiff-goes-black-when-zoomed-out-in-qgis%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay