Azad Rasul
SmartRS

Follow

SmartRS

Follow

5- Loading raster files

Azad Rasul's photo
Azad Rasul
·Jun 25, 2021·

1 min read

Play this article

For loading raster files, GDAL library is used.

Firstly, download the data.

Then, get the path of the raster file:

uri = "D:/Python_QGIS/data/dem_subset.tif"

Now add the layer

The format is:

rlayer = iface.addRasterLayer(data_source, layer_name, provider_name)

rlayer = iface.addRasterLayer(uri, "my_raster", "gdal")

If you like the content, please SUBSCRIBE to my channel for the future content

 
Share this