Convert vector to raster

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''.
# Click {{button|text=Open}}, the raster layer appears on the QGIS canvas.
+
* Click {{button|text=Open}}, the raster layer appears on the QGIS canvas.
# Open the raster calculator and apply the following formula:
+
 
[[File:Qgis_rastercalc_zero.png]]
+
* In the search engine of the Processing Toolbox, type PCA and select '''DimensionalityReduction(pca)''' under Image Filtering of the Orfeo Toolbox.
# Define path and name for the single band output layer.
+
* Under the Parameter tab, select Multispectral band file as the input layer.
# Click on the ‘OK-button’.
+
* Select '''pca''' under the Algorithm tab.
# 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.
+
* Enter 4 as the number of components.
** Type in the textbox '''Nodata value''': {{typed|text=0}}
+
* Specify the directory to save the output file.
** Unfold the '''Advanced parameters''' and change the output data format to unsigned 16bit integer): {{typed|text=-ot UInt16}}
+
* Untick output file after running algorithm (inverse output image) option.
** Click the button {{button|text=...}} of '''Converted''' to select path and name of output file.
+
* Click on {{button|text=Run}} to execute the algorithm.
** Click {{button|text=Run}}.
+
 
  
 
[[category:Working with Vector Data]]
 
[[category:Working with Vector Data]]

Revision as of 13:23, 26 November 2017

  • Click the Add raster layer QGIS 2.0 addrast.png and select the file C:/OSGeo4W64/geodata/raster/s2/Subset_S2A_MSIL2A_20170619T.tif.
  • Click Open, the raster layer appears on the QGIS canvas.
  • In the search engine of the Processing Toolbox, type PCA and select DimensionalityReduction(pca) under Image Filtering of the Orfeo Toolbox.
  • Under the Parameter tab, select Multispectral band file as the input layer.
  • Select pca under the Algorithm tab.
  • Enter 4 as the number of components.
  • Specify the directory to save the output file.
  • Untick output file after running algorithm (inverse output image) option.
  • Click on Run to execute the algorithm.
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export