GDAL

How to use GDAL to save raster files in Python

Solutions using rasterio work, we all know that. However, installing rasterio and GDAL in the same conda environment is many times a challenge… So I usually try not to install both of them together. I am showing to you today what I think is, in my experience, the easiest way to save raster data using GDAL.

Solved: QGIS 3.20 Python Console shows an error when running Clip Vector by Extent tool

ERROR 1: Attempt to write non-multipoint (POINT) geometry to multipoint shapefile. ERROR 1: Unable to write feature 0 from layer points_layer. ERROR 1: Terminating translation prematurely after failed translation of layer points_layer (use -skipfailures to skip errors)

Sampling raster values in predetermined points on QGIS

In this post, I show how to perform this process using two different tools, one of them is native of QGIS, and the other is a plugin available on the plugin repository. Then, I comment on how to sample the original raster using an interpolation such as cubic, cubic spline, or bilinear for the sampled value.

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:

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.

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.

Batch processing – automatizing the use of GDAL and SAGA GIS tools using Bash Shell scripts

One of the simplest yet most tricky ways of doing batch processing is by using Bash scripts. Bash is a type of Shell Script, which means it runs directly on a user interface that accesses the services of an operating system.

Solved: SAGA GIS 7.9.0 and 2.3.2 (in QGIS) input error “Error: Catchment Area” on the execution of LS Factor “saga_cmd ta_hydrology 22” and other algorithms

Last week, we talked a little about using SAGA on Command Line. Today, I am discussing solutions to the problem “Error: Catchment Area” on SAGA GIS. Or “Error: your input raster”, or “Input layers do not have the same grid extent”.