Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]Read and display geotiff images.
QtWS25 Last Chance

[SOLVED]Read and display geotiff images.

Scheduled Pinned Locked Moved General and Desktop
qimagegeotiff
11 Posts 2 Posters 6.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Are you interested in reading only the image or also the metadata ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • ealioneE Offline
      ealioneE Offline
      ealione
      wrote on last edited by
      #3

      Hi SGaist,

      I would actually be interested in having the metadata too, because I want to calculate the total distance of the image (in meters).
      But if that is not possible to do then just the image should be fine.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • ealioneE Offline
          ealioneE Offline
          ealione
          wrote on last edited by
          #5

          I will try that and report back. The textKeys, suggestion I mean.

          1 Reply Last reply
          0
          • ealioneE Offline
            ealioneE Offline
            ealione
            wrote on last edited by ealione
            #6

            @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.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #7

              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.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • ealioneE Offline
                ealioneE Offline
                ealione
                wrote on last edited by
                #8

                Indeed I should.
                Seems like geotiflib is a good solution. Actually reading the tags should be actually pretty easy. I mean that it can be achieved with minimal changes to the existing tiff parser, so hopefully this wont be an issue on future releases.

                1 Reply Last reply
                0
                • ealioneE Offline
                  ealioneE Offline
                  ealione
                  wrote on last edited by
                  #9

                  Issue opened here.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    If you need to do it for your project anyway, you could improve the tiff parser from Qt :)

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • ealioneE Offline
                      ealioneE Offline
                      ealione
                      wrote on last edited by
                      #11

                      Yeah as I said above, I had a quick look and I believe it can be done relatively with ease. I will definitely give it a try as soon as I find some time :)

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved