Split stack

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
# Click the {{button|text=Add raster layer}} [[Image:QGIS_2.0_addrast.png|20px]] and select the file  ''C:/OSGeo4W64/geodata/raster/s2/Subset_S2A_MSIL2A_20170619T.tif''.
 
# Click the {{button|text=Add raster layer}} [[Image:QGIS_2.0_addrast.png|20px]] and select the file  ''C:/OSGeo4W64/geodata/raster/s2/Subset_S2A_MSIL2A_20170619T.tif''.
 
# After clicking {{button|text=Open}}, the raster layer appears on the QGIS canvas.
 
# After clicking {{button|text=Open}}, the raster layer appears on the QGIS canvas.
# Go to {{mitem|text=Raster --> Conversion --> Translate(Convert format)}}.
+
# In the processing toolbar, type {{typed|text=Translate}} into the search field to find the {{button|text=GDAL\OGR --> Translate (Convert format}} tool and open it.
Specify the multiband file as Input Layer. Select path and name of output file.
+
# Unfold the '''Advanced parameters''' and change the output data format to unsigned 16bit integer): {{typed|text=-ot UInt16}}
Click [[File:Qgis_edit_gdal.png]] and type the following additional options into the textbox:
+
# Click the button {{button|text=...}} of '''Converted''' to select path and name of output file.
*{{typed|text=-b 1}} (Select only first band)
+
# Type in the textbox '''Additional creation parameters''': {{typed|text=-b 1}}  
*{{typed|text=-ot UInt16}} (Output data format: unsigned 16bit integer)
+
(Select only first band).
Click {{button|text=OK}}.
+
# Click {{button|text=Run}}.
 
[[File:Qgis_split_stack.png|400px]]
 
[[File:Qgis_split_stack.png|400px]]
 
+
Repeat the steps for other bands: change the name of the output file and edit the -b option accordingly.
Repeat for other bands: Click [[File:Qgis_edit_gdal.png]] to leave the edit mode. Edit name of the '''Output file''' Click [[File:Qgis_edit_gdal.png]] again to edit the and -b option in the command line text window accordingly.
+
#Create a multiband file with a spectral subset of 4 bands. Change the output file and the additional creation options: *{{typed|text=Subset_S2A_MSIL2A_20170619T_B02030408.tif}}
#Create a multiband file with 4 bands. Edit the output file: *{{typed|text=Subset_S2A_MSIL2A_20170619T_B02030408.tif}}
+
 
*{{typed|text=-b 2 -b 3 -b 4 -b 8}}
 
*{{typed|text=-b 2 -b 3 -b 4 -b 8}}
*{{typed|text=-ot UInt16}}
+
# Click {{button|text=Run}}.
Click {{button|text=OK}}.
+
 
+
  
 
[[Category:Working with Raster Data]]
 
[[Category:Working with Raster Data]]

Revision as of 00:34, 23 October 2017

  1. Click the Add raster layer QGIS 2.0 addrast.png and select the file C:/OSGeo4W64/geodata/raster/s2/Subset_S2A_MSIL2A_20170619T.tif.
  2. After clicking Open, the raster layer appears on the QGIS canvas.
  3. In the processing toolbar, type Translate into the search field to find the GDAL\OGR --> Translate (Convert format tool and open it.
  4. Unfold the Advanced parameters and change the output data format to unsigned 16bit integer): -ot UInt16
  5. Click the button ... of Converted to select path and name of output file.
  6. Type in the textbox Additional creation parameters: -b 1

(Select only first band).

  1. Click Run.

Qgis split stack.png Repeat the steps for other bands: change the name of the output file and edit the -b option accordingly.

  1. Create a multiband file with a spectral subset of 4 bands. Change the output file and the additional creation options: *Subset_S2A_MSIL2A_20170619T_B02030408.tif
  • -b 2 -b 3 -b 4 -b 8
  1. Click Run.
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export