3

I have downloaded the following precipitation data in .nc4 format(attached). I have opened the 'PRECIPITATION' variable in the file in QGIS and I have made a note of its statistics. As working with nc files consumes more data and time, I have written the data of precipitation variable in an ascii file using MATLAB. I have opened the ascii file in QGIS and I have found that the statistics i get from the properties->metadata is different from that of nc file and if i run the zonal statistics of the ascii file for the entire polygon boundary, the statistics are matching with the ones of nc file. Can anybody please help me with the reason behind this.

ASCII File https://drive.google.com/file/d/0B8OJc_3nbFeLcTlWbTE1YzA4TUU/view?usp=sharing

nc file https://drive.google.com/file/d/0B8OJc_3nbFeLTDM3Z0lXQktUVGFxaTl6U1NZc3EzcFhkUzRR/view?usp=sharing

1

The asc file does not contain any statistic metadata. So QGIS uses gadlinfo -approx_stats to get a quick result for the statistics. Further down the metadata, you will read No stats collected yet.

You can force the computation of statistics with gdalinfo -stats. The result will be written to a file named 30_12_2009.asc.aux.xml. You can open it with any text editor.

Once the statistics are written into the file, QGIS will read that information.

You can access gdalinfo inside QGIS with Raster -> Miscellaneous -> Information, but would have to add -stats manually in the command line box.

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.