I have a TIF file containing tabular climatic data, described here, which I am trying to export to spreadsheet / CSV format: http://www.helioclim.org/linke/linke_helioserve.html

In summary, it is a TIF with no header, 2160 rows by 4320 columns, where the upper left corner is 90 N, 180 W, and the lower right corner is 90S 180 E. Standard stuff. I also know that the output data is supposed to be an integer roughly between 40 and 140.

All I want to do is to extract the tabular data into a spreadsheet as source data for calculation purposes (I'm well aware that the column count exceeds Excel's capabilities). It seems the TIF is used as a very efficient container of the GIS raw data. And since the TIF contains data that is already in tabular format, I thought it would be relatively easy (not the case).

So far the only thing that has 'kinda' worked I have tried freeware "Grid Convert" to CSV, but it produces 3 columns of output data, the first 2 being all zeros and the third, 7 digits long, presumably 9,331,200 rows. It's still useless, but nothing else has worked. I don't have much experience working with this kind of data format, a starting heads up would be welcome :)

In case it might help, this is a download link to part of the raw data, under "Linke Turbidity Factor: Monthly maps" http://www.soda-is.com/eng/services/climat_free_eng.php

Anybody have any ideas how I may extract the raw data from the TIF file?

Thanks in advance


A very simple approach which springs to mind is to export the tiff to an ascii grid format such as ESRI's .asc file. You will then have a space delimited plain text file. It will have a few header lines which describe the origin, resolution and NoData values etc and you can easily skip over these for the sake of you calculations. You can do the translation using GDAL_translate or QGIS if you are looking for free tools or obviously use ArcGIS if you have it.

Alternatively, instead of changing the storage format, why not change your approach to performing the calculations? There are various APIs and tools available that will allow you to do all manner of calculations on an array (which is all the Tiff is after all). For example you gould use the GDAL Python Api in conjunction with NumPy and/or SciPy. The latter two modules give you great array handling capabilities. In that way you could analyse the Tiff as-is.

  • I just converted the feb.tif file in QGIS 1.8 to a Arc/Info ascii grid using Raster|Conversion|Translate. Took about 3 seconds and produced a 28MB ascii text file of the values, just like @MappaGnosis said. QGIS with GDAL is probably your best software solution. May 29 '13 at 14:27
  • Conversion to .ASC worked, and once I figured out the scaling of values in the TIF, the process worked. However the files are large in the extreme (1.5 GB for 12 months of data). Worst case, I know this will work. I will try tinkering with the proposed alternatives, as long as it won't require the user to install new software or activate a VBA add-in as this will cause conflict with the rigid corporate policy on the matter. Thanks for the help, it was thorough and appreciated.
    – W5ALIVE
    May 31 '13 at 14:41
  • Yes - that's the problem with any ascii version (including csv) of a binary format. Corporate policies like that are annoying and frustrating in the extreme. May 31 '13 at 14:46

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.