[SOLVED]Read and display geotiff images.
-
Hi,
Are you interested in reading only the image or also the metadata ?
-
Unless I'm mistaken (please correct me if I'm wrong) but GeoTiff uses tiff, which is already supported by Qt however I don't think you can access the meta data directly maybe using QImageReader::textKeys() and friends.
-
@SGaist I tried using textKeys but unfortunately they report nothing back when I try to search about available text keys.
What I do get though are warnings of the type
TIFFReadDirectory: Warning, Unknown field with tag 33550 (0x830e) encountered. TIFFReadDirectory: Warning, Unknown field with tag 33922 (0x8482) encountered. TIFFReadDirectory: Warning, Unknown field with tag 34735 (0x87af) encountered. TIFFReadDirectory: Warning, Unknown field with tag 34736 (0x87b0) encountered. ...
That are actually tags but there seems to be no method of reading them.
-
That's what I feared. You could open a feature request on the bug report system and use a library like GDAL in-between to get the tags.
-
-
If you need to do it for your project anyway, you could improve the tiff parser from Qt :)