0

I have tifs and with help from this community I have been able to navigate them with gdal, rasterio, geopandas etc. I also understand that they encode raster data. But I am not sure what additional metadata is encoded in them.

Is there some way for me to browse through the metadata and make this information more human readable in python?

I would like to leverage this metadata in an ML problem, but I don't just want to throw it into a neural network to figure it out.

2
  • 1
    Other than asking the creator for more specific information about these data you could use gdalinfo to read the infomation stored in the TIFF. gdal.org/programs/gdalinfo.html
    – GBG
    Dec 6 '21 at 16:41
  • @GBG thanks, this seems like the most straightforward way to me!
    – Oliver
    Dec 7 '21 at 8:35
2

1- One way is contacting the developer/owner/project manager/scientist who puts the .tif files online.

2- Another way is to read the .tif description (some kind of internal metadata that is available via .tif format.

3- Is to locate the bounds and look at its aerial/satellite images and speculate what it might be.

4- If your raster is accompanied by an *.hdr or readme.txt, open them in a text viewer and you'll possibly find all the information

3
  • thank you very much for this list, 1 I did it's a 3rd party so we didn't get far. 2) how do I read the .tif description? 3) I am doing this right now and feel a little lost. 4) unfortunately no such file.
    – Oliver
    Dec 7 '21 at 8:14
  • 1
    Open the .tif in any GIS software, then right-click on the .tif layer -> properties. Under meta-data or something similar you will typically find a lot!
    – Ash
    Dec 7 '21 at 9:46
  • Oh, I see, so there likely isn't much here then: i.imgur.com/BSVzW9G.png ? I'm using QGIS.
    – Oliver
    Dec 7 '21 at 15:16
1

I like to use 'pyexiftool' for this particular case, which is a python wrapper for the useful program 'exiftool': http://smarnach.github.io/pyexiftool/

It has built in functionality to handle multiple images, which will be handy for you when mining for ML inputs.

1
  • Hi, thanks, this looks very useful, I haven't gotten it to work fully yet though
    – Oliver
    Dec 7 '21 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.