1

I want to get the pixel size (resolution) of a raster without opening up the raster in gdal. I currently have my script opening the raster in GDAL using gdal.Open() and getting the resolution that way. However this process is slow especially when my TIFFs are large and I have many of them.

Is there a way to grab this info from the metadata or something without opening the file?

  • 6
    Post up an example of the code you're using. Just calling gdal.Open() shouldn't be too expensive without actually reading any data – mikewatt Jan 20 at 18:44
  • Welcome to GIS SE! We're a little different from other sites. We're a Q&A site, not a discussion forum. For questions that involve code we ask that you show us where you are stuck with your own code by including a code snippet in your question. There is an edit button beneath your question which will enable you to do that and a {} button that enables you to format any highlighted code nicely. Please check out our short tour for more about how the site works. Thanks. – PolyGeo Jan 20 at 22:26