README.md 1.73 KB
Newer Older
1
# Rename bands processing plugin for QGIS
PIERSON Julie's avatar
PIERSON Julie committed
2 3 4 5 6

## Brief summary

These 2 scripts can be used to rename bands from a raster file :

7 8
- **Rename and reorder bands** allows user to choose a raster input and rename and/or reorder its bands
- **Merge and rename bands** allows user to choose multiple single band rasters and merge them as a multiband raster, and to select band names and order in the process
PIERSON Julie's avatar
PIERSON Julie committed
9 10 11

This plugin is added in processing, in a provider called "rename bands".

12 13 14 15 16 17
## How it works

### Rename and reorder bands

This script takes 2 input paramaters :

18
- a raster layer (must be already loaded in QGIS)
PIERSON Julie's avatar
readme  
PIERSON Julie committed
19
- a table with 3 columns. When a raster layer is selected, this table is automatically populated with one row for each band. The table columns are for : 1/ band order (1, 2, 3...) 2/ band name (this column can be empty if no description is set for the bands) 3/ new band name
20

PIERSON Julie's avatar
readme  
PIERSON Julie committed
21 22 23 24 25 26
User can then :
- edit the third column to set new band names
- change band order by using up and down button
- remove a band by selecting it and pressing the minus button.

A raster output is created. It will be the same as the input raster but with different band names and order, according to user input. It may have less bands than input raster, if user deleted bands in table.
27

PIERSON Julie's avatar
typo  
PIERSON Julie committed
28
### Merge and rename bands
29

30 31 32 33 34 35
This script takes 2 input parameters :

- a list of single band raster layers (must be already loaded in QGIS), a band name can be set for each layer
- a nodata value

Layers are then merged to create a multi-band raster, in the order defined by user.
36

PIERSON Julie's avatar
PIERSON Julie committed
37 38
## Dependencies

39
This plugin uses the following Python modules :
PIERSON Julie's avatar
PIERSON Julie committed
40

41
- osgeo
PIERSON Julie's avatar
PIERSON Julie committed
42 43 44 45 46

## More details

Do not hesitate to message me if there is any problem, or if you have any ideas to make it better ! It is experimental work.