Raster histogram
From AWF-Wiki
(Difference between revisions)
(→Using Layer Properties) |
(→Using Layer Properties) |
||
Line 1: | Line 1: | ||
== Using Layer Properties == | == Using Layer Properties == | ||
− | # Click the {{button|text=Add raster layer}} [[Image:QGIS_2.0_addrast.png|20px]] and select the file '' | + | # Click the {{button|text=Add raster layer}} [[Image:QGIS_2.0_addrast.png|20px]] and select the file ''/geodata/raster/s2/Subset_S2A_MSIL2A_20170619T_MUL.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. | ||
# Right click the layer name in the Layers panel and select {{mitem|text=Properties --> Histogram}} | # Right click the layer name in the Layers panel and select {{mitem|text=Properties --> Histogram}} |
Revision as of 09:44, 23 April 2018
Using Layer Properties
- Click the Add raster layer and select the file /geodata/raster/s2/Subset_S2A_MSIL2A_20170619T_MUL.tif.
- After clicking Open , the raster layer appears on the QGIS canvas.
- Right click the layer name in the Layers panel and select Properties --> Histogram
This dialog displays a histogram for all bands band. Left click and drag a box on the diagram to zoom in. Click on Pref/Actions and activate Draw as lines (Figure A).
Click on Pref/Actions and deactivate Draw as lines. Activate Show selected band and Always show min/max markers.
The value range of the selected band data is evenly divided into bins. The histogram shows how many pixels of the image fall into each of the bins (Figure B). Click on . The graphics may be saved as png file.Using R scripts
- If the processing toolbox is not visible, select Processing --> Toolbox.
- In the processing toolbar, type Get R scripts into the search field and click to open it. In the Install scripts and model windows unfold the folder Not installed and activate Advanced histogram as shown below in the screenshot. Click OK.
- In the processing toolbar, type Get R scripts into the search field and click to open the diaolog window. Specify the Input raster Layer and click the button ... on to select the path and filename for the output graphics file. Click Run.
. Be patient and have a look on the messages in the log window as some additional R packages need to be downloaded. The resulting graphics shows all histograms side by side.