raster

How to read grib2 raster data on Python

I use pygrib to open the files. In their documentation, they point to two ways to install pygrib, using pip or using conda. However, I could only make it work using conda. Run this in your Anaconda Prompt to install pygrib.

Solved: new version rasterio 1.0+ won’t let me use GDAL transforms

This week, I am discussing an error which used to be a warning on the old rasterio - and I ignored it. Lesson learned! I was doing my usual savings of GeoTIFF rasters in an updated python environment (with rasterio 1.2.6) when I saw this error:

Using SAGA Raster Calculator on QGIS - a quick tutorial

The SAGA Raster calculator is useful because it allows to make some calculations that the regular QGIS Raster Calculator does not. Especially, it allows us to use the X and Y coordinates of the raster as inputs for our calculations. How do we start?

Solved: GDAL accuses no free disk space when there is plenty

[SOLVED] ERROR 3: Free disk space available is 85802630536 bytes, whereas 730874237760027488 are at least necessary. You can disable this check by defining the CHECK_DISK_FREE_SPACE configuration option to FALSE.

When I mosaic two rasters, the size of the resulting raster is almost always larger than the sum of the sizes of the original rasters. Why is that?

Short answer: your GIS software needs to fill the blanks in the area with NoData pixels. Long answer: I will demonstrate what happens by an example on QGIS 3.18, and show why the final raster tends to be larger than the other two summed.

How to georeference images using QGIS 3

Today, I am going to show you how to georeference an image using QGIS 3.18. Maybe you found this image in a paper, or maybe it is an aerial photograph. It doesn’t matter! If you know the coordinates of at least two non collinear points, you can add geolocation to the image!

How and when to use QGIS 3 tools “Warp (reproject)”, “Clip raster by extent” and “Clip raster by mask layer”

Today, I am discussing different ways of cutting (clipping) a raster in QGIS and what they do. Especially, I am comparing QGIS GDAL tools “Clip raster by mask layer”, “Clip raster by extent” and “Warp (reproject)” in what are they used for, and what exactly do they do to the original raster data.

How to open, edit and save raster files (.tif) using Python

Today, I am going to write about how to open, edit and save raster files using Python if you are familiarized with Python (mainly Anaconda). Maybe you need to run every pixel in a raster through a Python function, or you want to do custom operations with them that are not available on GUI software such as QGIS. It also can be used to do batch processing. We are going to use GDAL on Python, installed through Conda, to do this.

How to load (many) raster layers on QGIS 3.18 by batch process and alter their symbology together

Today, I am going to write about the batch processing of loading and altering the symbology of a big group of raster layers on QGIS. This tutorial was made on QGIS 3.18 Zürich, using its Python Console to load the layers.