#6339 closed defect (fixed)

Overview Creation fails in geopackages created using Tiling Scheme

Reported by: Augustus Owned by: warmerdam
Priority: normal Milestone: 2.0.3
Component: default Version: 2.0.1
Severity: normal Keywords: raster geopackage gdaladdo
Cc:

Description (last modified by Augustus)

The following command will cause a crash for large tiled images. With small tiled images the overviews creation is done fine

gdal_translate -of GPKG byteError.tif gpkg.gpkg -co TILING_SCHEME=GoogleMapsCompatible
gdaladdo gpkg.gpkg 2 4 8 16 32

You can reproduce this issue by re-sampling the byte.tif to 9999 rows and columns and then manipulating the resultant tif file using the above commands https://github.com/OSGeo/gdal/blob/trunk/autotest/gdrivers/data/byte.tif I have attached the intermediate files.

Update: Workflow for reproducing the issue

Attachments (3)

gpkg.gpkg (439.0 KB) - added by Augustus 19 months ago.
byte4800.tif (486.0 KB) - added by Augustus 19 months ago.
Log (21.8 KB) - added by Augustus 18 months ago.
ErrorLog?

Download all attachments as: .zip

Change History (11)

Changed 19 months ago by Augustus

Attachment: gpkg.gpkg added

Changed 19 months ago by Augustus

Attachment: byte4800.tif added

comment:1 Changed 19 months ago by Even Rouault

Resolution: duplicate
Status: newclosed

I guess this is the same as #6335 I cannot reproduce any issue after the fixes done in #6335 (instead of the error message you got in #6335, crash was also likely)

comment:2 Changed 18 months ago by Augustus

Description: modified (diff)

I was able to reproduce this issue with larger images. Steps to reproduce this issue

Data is Attached byte4800.tif

gdal_translate -outsize 9999 10118 byte4800.tif byteError.tif
gdal_translate -of GPKG byteError.tif Test.gpkg -co TILING_SCHEME=GoogleMapsCompatible

Error

ERROR 1: sqlite3_exec(UPDATE partial_tiles SET zoom_level = -21, partial_flag =
0 WHERE zoom_level = 20 AND partial_flag != 0) failed: columns zoom_level, tile_
column, tile_row are not unique
ERROR 1: sqlite3_exec(UPDATE partial_tiles SET zoom_level = -21, partial_flag =
0 WHERE zoom_level = 20 AND partial_flag != 0) failed: database disk image is ma
lformed
Last edited 18 months ago by Augustus (previous) (diff)

comment:3 Changed 18 months ago by Augustus

Description: modified (diff)
Resolution: duplicate
Status: closedreopened

comment:4 Changed 18 months ago by Even Rouault

Witch which version / revision of the code did you try ? Is it at least 2.0.2 ? I just tried with the latest state of the 2.0 branch with your instructions and it works fine

comment:5 Changed 18 months ago by Augustus

I have done the test on build from latest source Revision 33721 with

sqlite3 v3.7.17-2
proj4 v4.9.2-2
Windows 8.1

comment:6 Changed 18 months ago by Even Rouault

I've just tested with latest trunk as well, and cannot still reproduce. However in trunk now the default value for the GDAL_CACHEMAX configuration option is 5% of the RAM, so the issue might be dependant on that. Could you add "--debug on" to the gdal_translate command line and check the debug trace "GDAL: GDAL_CACHEMAX = xx MB" and report the value of xx ?

Changed 18 months ago by Augustus

Attachment: Log added

comment:7 Changed 18 months ago by Augustus

Detailed Log is now attached.

GDAL: GDAL_CACHEMAX = 102 MB

Updated to sqllite3 3.11.1

comment:8 Changed 17 months ago by Even Rouault

Milestone: 2.0.3
Resolution: fixed
Status: reopenedclosed

Reproduced with GDAL_CACHEMAX = 102 MB

trunk r33727, branches/2.0 r33728 "GPKG write support: fix inversion of row/column in one of the SQL request involved in partial tiles management (#6339)"

Note: See TracTickets for help on using tickets.