8.3. Lesson: 地形解析¶

ある種のラスターからはそれが表す地形の洞察をより多く得ることができます。数値標高モデル(DEM)がこの点では特に有用です。このレッスンでは先ほどからの住宅開発案の調査地域についてより詳しく調べるのに地形解析ツールを使用します。

このレッスンの目標: 地形に関する詳細な情報を取得するために地形解析ツールを使用します。

The DEM you have on your map right now does show you the elevation of the terrain, but it can sometimes seem a little abstract. It contains all the 3D information about the terrain that you need, but it doesn’t look like a 3D object. To get a better look at the terrain, it is possible to calculate a hillshade, which is a raster that maps the terrain using light and shadow to create a 3D-looking image.

To work with DEMs, you should use QGIS’ all-in-one DEM (Terrain models) analysis tool.

• Click on the menu item Raster ‣ Analysis ‣ DEM (Terrain models).
• In the dialog that appears, ensure that the Input file is the DEM layer.
• Set the Output file to hillshade.tif in the directory exercise_data/residential_development.
• Also make sure that the Mode option has Hillshade selected.
• Check the box next to Load into canvas when finished.
• You may leave all the other options unchanged.
• Click OK to generate the hillshade.
• When it tells you that processing is completed, click OK on the message to get rid of it.
• Click Close on the main DEM (Terrain models) dialog.

きれいで3次元的に見えますが、これは改善できるでしょうか? 陰影図はそれだけでは石膏模型のように見えます。どうにかしてそれを他のよりカラフルなラスターと一緒に使用できないでしょうか? もちろんできます。オーバーレイとして陰影図を使用します。

• Change the symbology of the original DEM to use the Pseudocolor scheme as in the previous exercise.

• Hide all the layers except the DEM and hillshade layers.

• Click and drag the DEM to be beneath the hillshade layer in the Layers list.

• Set the hillshade layer to be transparent by opening its Layer Properties and go to the Transparency tab.

• Set the Global transparency to 50%:

• Click OK on the Layer Properties dialog. You’ll get a result like this:

• Switch the hillshade layer off and back on in the Layers list to see the difference it makes.

Remember to save your map when you are done.

ノート

For the next two exercises, please use a new map. Load only the DEM raster dataset into it (exercise_data/raster/SRTM/srtm_41_19.tif). This is to simplify matters while you’re working with the raster analysis tools. Save the map as exercise_data/raster_analysis.qgs.

To do this, you need to use the Slope mode of the DEM (Terrain models) tool.

• Open the tool as before.

• Select the Mode option Slope:

• Set the save location to exercise_data/residential_development/slope.tif

• Enable the Load into canvas... checkbox.

• Click OK and close the dialogs when processing is complete, and click Close to close the dialog. You’ll see a new raster loaded into your map.

• With the new raster selected in the Layers list, click the Stretch Histogram to Full Dataset button. Now you’ll see the slope of the terrain, with black pixels being flat terrain and white pixels, steep terrain:

8.3.4. Try Yourself calculating the aspect¶

The aspect of terrain refers to the direction it’s facing in. Since this study is taking place in the Southern Hemisphere, properties should ideally be built on a north-facing slope so that they can remain in the sunlight.

• Use the Aspect mode of the DEM (Terain models) tool to calculate the aspect of the terrain.

その答えは ラスター計算機 です。

• Click on Raster > Raster calculator... to start this tool.
• To make use of the aspect dataset, double-click on the item aspect@1 in the Raster bands list on the left. It will appear in the Raster calculator expression text field below.

North is at 0 (zero) degrees, so for the terrain to face north, its aspect needs to be greater than 270 degrees and less than 90 degrees.

• In the Raster calculator expression field, enter this expression:

aspect@1 <= 90 OR aspect@1 >= 270

• Set the output file to aspect_north.tif in the directory exercise_data/residential_development/.

• Ensure that the box Add result to project is checked.

• Click OK to begin processing.

あなたの結果はこのようになります:

8.3.6. Try Yourself¶

• The first will be to identify all areas where the slope is less than or equal to 2 degrees.
• The second is similar, but the slope should be less than or equal to 5 degrees.
• Save them under exercise_data/residential_development/ as slope_lte2.tif and slope_lte5.tif.

• aspect_north: 地形が北に面している

• slope_lte2: 斜面傾斜が2度以下

• slope_lte2: 斜面傾斜が5度以下

Where the conditions of these layers are met, they are equal to 1. Elsewhere, they are equal to 0. Therefore, if you multiply one of these rasters by another one, you will get the areas where both of them are equal to 1.

Therefore, you need to find areas where the slope is at or below 5 degrees AND the terrain is facing north; OR the slope is at or below 2 degrees. Such terrain would be suitable for development.

これらの抽出条件を満たすエリアを計算します:

• Open your Raster calculator again.

• Use the Raster bands list, the Operators buttons, and your keyboard to build this expression in the Raster calculator expression text area:

( aspect_north@1 = 1 AND slope_lte5@1 = 1 )  OR slope_lte2@1 = 1

• Save the output under exercise_data/residential_development/ as all_conditions.tif.

• Click OK on the Raster calculator. Your results:

• Open the Sieve tool (Raster ‣ Analysis ‣ Sieve).
• Set the Input file to all_conditions, and the Output file to all_conditions_sieve.tif (under exercise_data/residential_development/).
• Set both the Threshold and Pixel connections values to 8, then run the tool.

Once processing is done, the new layer will load into the canvas. But when you try to use the histogram stretch tool to view the data, this happens:

どうなっているのでしょうか? 答えは新しいラスターファイルのメタデータにあります。

• View the metadata under the Metadata tab of the Layer Properties dialog. Look in the Properties section at the bottom.

Whereas this raster, like the one it’s derived from, should only feature the values 1 and 0, it has the STATISTICS_MINIMUM value of a very large negative number. Investigation of the data shows that this number acts as a null value. Since we’re only after areas that weren’t filtered out, let’s set these null values to zero.

• Open the Raster Calculator again, and build this expression:

(all_conditions_sieve@1 <= 0) = 0

This will maintain all existing zero values, while also setting the negative numbers to zero; which will leave all the areas with value 1 intact.

• Save the output under exercise_data/residential_development/ as all_conditions_simple.tif.

これは期待されたもので、以前の結果を簡素化したものです。あなたが得た結果が期待したものでない場合は、メタデータ(および該当する場合はベクターの属性)を見ると問題を解決するための要点がわかることを覚えておいて下さい。

8.3.9. In Conclusion¶

You’ve seen how to derive all kinds of analysis products from a DEM. These include hillshade, slope and aspect calculations. You’ve also seen how to use the raster calculator to further analyze and combine these results.

8.3.10. What’s Next?¶

２つの分析結果が得られました：潜在的に適した小地所を示すベクター分析の結果と潜在的に適した地形を示すラスター分析の結果です。この問題の最終的な結果に到達するためにどのようにこれらを組み合わせるか？それが次のレッスンのトピックです。次のモジュールで始まります。