Tag Info

Hot answers tagged

4

Is Python an option? Use RasterIO (a Python GDAL/ numpy bridge) to load the raster to NumPy array, then use numpy.amax() to find the maximum value, followed by numpy.where() to find the row/column indices, then calculate the lat and lon from the raster extents.


2

I recommend using Python or R (or a GIS software), as @Marc Pfister has suggested. However, you can do it with bash and gdal only, and heavy usage of grep. First get the Min/Max values without coordinates: Obtain the Min / Max values with gdalinfo or gdalinfo -mm like explained in your other question about Min/Max values. Use grep (and possibly some awk) ...


2

It doesn't look like your code properly saves/closes the dataset. To do this, add this to the end: dst_ds = None # save, close Also, although it looks like you want to use -999 for NODATA, this needs to be set to the resulting band. If you want to learn more about raster processing with Python, check out rasterio.


1

It would be good if you provided a bit more detail to your question and indicated what you have already tried. Working examples are always appreciated. Here is a function that calculates a correlogram on point data. You could, in theory, modify it to operate on a raster or on a subsample of a raster. Although, I wonder about the computational tractability ...


1

I get a similar result when I load these tiffs into QGIS 2.2.0, with the 60N tif showing max and min values of 0. Using the gdalinfo -stats option on these tifs suggests that both do have some values: E:\TESTing>gdalinfo -stats Hansen_GFC2013_lossyear_60N_140W.tif Driver: GTiff/GeoTIFF Files: Hansen_GFC2013_lossyear_60N_140W.tif ...



Only top voted, non community-wiki answers of a minimum length are eligible