Opened 12 years ago

Closed 12 years ago

#105 closed defect (fixed)

bug with multiband TIFF files

Reported by: joachim.ungar@… Owned by: Dimitar Misev
Priority: blocker Milestone:
Component: conversion Version: 8.2
Keywords: TIFF, import, tiled Cc: Peter Baumann
Complexity: Medium

Description

follow-up of ticket #104

after transforming the TIFF into an untiled one, again results in a 0-filled collection.

rasql -q "select m[0:10,0:10] from mr as m" —out hex

rasql: rasdaman query tool v1.0, rasdaman v8 -- generated on 23.12.2011 09:32:23.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...ok
Query result collection has 1 element(s):
  Result object 1:  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 
rasql done.

N?.log output:

...
Request: 'insert into test2 values inv_tiff( #MDD0# )'...parsing...checking semantics...
QtConversion::checkType() for conversion inv_tiff assume the result marray <char>
evaluating...TIFF warning: /tmp/0x1b5c720.tif: unknown field with tag 33550 (0x830e) encountered
TIFF warning: /tmp/0x1b5c720.tif: unknown field with tag 33922 (0x8482) encountered
TIFF warning: /tmp/0x1b5c720.tif: unknown field with tag 34735 (0x87af) encountered
TIFF warning: /tmp/0x1b5c720.tif: unknown field with tag 34736 (0x87b0) encountered
TIFF warning: /tmp/0x1b5c720.tif: unknown field with tag 34737 (0x87b1) encountered
TIFF warning: /tmp/0x1b5c720.tif: unknown field with tag 42113 (0xa481) encountered
 QtConversion::evaluate() for conversion inv_tiff real result is marray <struct { char red, char green, char nir, char swir }>
ok
[2012-01-12 15:44:58] request completed in 1226612 usecs.
...

Ticket #69 gave me the hint that the TIFF may be too big (~6000x6000px).

For testing I created a smaller TIFF (sub.tif) which has a size of 100x100px.

hex output now seems to be fine:

rasql: rasdaman query tool v1.0, rasdaman v8 -- generated on 23.12.2011 09:32:23.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...ok
Query result collection has 1 element(s):
  Result object 1: f1 a9 80 68 ec a5 7c 67 ec a5 7f 68 f6 ac 82 6a ed a2 7b 68 db 95 72 5d b1 87 26  0 13  0  2  8  0  0  1  0 72 18  6  8  0  0  1  0 8e 23  9  8 d3 8a 69 54 cd 88 67 52 ca 87 65 50 cd 89 67 52 cd 8c 6b 54 d2 8f 6a 55 c9 85 64 4f c7 85 63 4e c5 89 63 4f ca 8a 67 53 d0 8b 6c 55 d3 8e 6c 56 d2 8e 6d 54 cc 8e 6b 50 c8 8b 69 52 ca 8b 68 52 d2 8d 6b 55 d0 8b 68 52 e5 9d 7a 60 da 98 74 5b cf 8e 6c 56 cf 8d 69 52 d1 8c 6a 53 cf 8c 69 53 
rasql done.

but the TIFF output not:

  • gdal_translate: sub2.tif
  • rasql: rasql_1.tif

So in facts we have two problems here. (1) bigger TIFFs are imported but just their extent/size, not their actual values and (2) imported smaller TIFFs do have values but they are mixed up somehow.

Attachments (5)

N1.017307.log (1.5 MB ) - added by joachim.ungar@… 12 years ago.
N1 log file
rasmgr.017284.log (2.8 KB ) - added by joachim.ungar@… 12 years ago.
rasmgr log file
sub.tif (39.7 KB ) - added by joachim.ungar@… 12 years ago.
100x100 px example TIFF
sub2.tif (39.3 KB ) - added by joachim.ungar@… 12 years ago.
example export with gdal_translate
rasql_1.tif (406 bytes ) - added by joachim.ungar@… 12 years ago.
example export with rasql

Download all attachments as: .zip

Change History (7)

by joachim.ungar@…, 12 years ago

Attachment: N1.017307.log added

N1 log file

by joachim.ungar@…, 12 years ago

Attachment: rasmgr.017284.log added

rasmgr log file

by joachim.ungar@…, 12 years ago

Attachment: sub.tif added

100x100 px example TIFF

by joachim.ungar@…, 12 years ago

Attachment: sub2.tif added

example export with gdal_translate

by joachim.ungar@…, 12 years ago

Attachment: rasql_1.tif added

example export with rasql

comment:1 by Dimitar Misev, 12 years ago

Cc: Peter Baumann added
Owner: changed from Peter Baumann to Dimitar Misev
Priority: majorblocker
Status: newassigned

comment:2 by Dimitar Misev, 12 years ago

Resolution: fixed
Status: assignedclosed
Summary: input/output error with big TIFF filesbug with multiband TIFF files

Joachim,

I've just submitted a patch to fix this, please verify how it works.

My tests indicate it works well, and I even used your sample TIFF in the system test of rasdaman.

Note that your TIFF is wrong: it indicates that it contains unsigned int data, but it has negative values. This results in the data being imported wrongly, you have to explicitly set the data type to octet (see ticket #115).

Btw, if the TIFF was too big you'd have gotten a memory error in the logs. The zeros were due to the bug with importing multiband images.

Note: See TracTickets for help on using tickets.