span8
span4
This article is also part of the tutorialHow Do I Do That in FMEγNext: Identifying Watersheds
Raster slopes can be measured in two ways: the slope angle and the slope aspect (direction).In FME slope angle is measured with the RasterSlopeCalculator transformer and slope aspect with the RasterAspectCalculator.
在本教程中,我们将尝试使用这些变压器,以了解它们的作用,and then use the RasterSlopeCalculator in a workspace that assesses land-use capabilities.
这些示例的源数据是CDED格式的光栅DEM数据集。In the FME Data Inspector it looks like this:
The lighter the color,the higher the elevation.深色区域代表低洼区域。
1。Start FME Workbench and begin with an empty canvas.Select Readers > Add Reader from the menubar.
When prompted set the data format to Canadian Digital Elevation Data (CDED) (or U.S.Geological Survey Digital Elevation Model (USGSDEM) - the two are different names for the same format).
选择附加数据作为源数据集。
2.Place a RasterSlopeCalculator transformer and a RasterAspectCalculator on the canvas.Draw a connection from the reader feature type to each of the transformers,然后将每个变压器的输出连接到检测变压器:
Check the parameters dialogs for each of the raster calculators to see what options are available,but generally leave the parameters as they are.
三。Run the workspace.The result will be two raster features that appear in the FME Data Inspector.
关闭背景地图,如果你打开了它们,因为它们会使查询数据变得更加困难。
现在依次隐藏每个光栅,以便检查其他光栅。
The slope feature looks like this:
通过单击某些光栅单元来查询它们。每个单元格现在表示该位置的坡度,rather than elevation.您将能够在图像的中心和右侧选择亮点。These are features that - although low-lying - have a steep slope.
方面功能如下:
Each cell now represents the direction of the slope at that location from 0-360 degrees.FME doesn't visualize this very well,because it interprets the values from zero (very dark) to 360 (very light) but you can identify each cell's value by clicking it.
4.我们可以(可选)使用RastereExpressionEvaluator变压器调整坡度,以便更好地显示。
将RasteExpressionEvaluator放置在RasteSpectCalculator与其连接的检查器之间的工作区中。打开参数对话框。将解释设置为“保留”。Double-click the Expression field and use the drop-down arrow to open the arithmetic calculator.
Inside the calculator enter the following expression:
if (A[0]>180,@abs(A[0]-360),A[0])
This will cause the aspect to be calculated from 0 to 180 both clockwise and anti-clockwise.The result will look like this:
注意颜色现在是如何更加一致的,making it easier to see the dark areas that face north.
1。本练习将使用光栅数据和RasterSlopeCalculator来计算土地的开发适宜性。建筑开发通常更喜欢平坦和低洼的土地。
Start FME Workbench and begin with an empty canvas.Select Readers > Add Reader from the menubar.
When prompted set the data format to Canadian Digital Elevation Data (CDED) (or U.S.Geological Survey Digital Elevation Model (USGSDEM)) and select the attached data as the source dataset.
2.Place a RasterSlopeCalculator transformer and draw a connection from the reader feature type to the transformer.
三。Place a RasterCellValueCalculator transformer.Draw a second connection from the reader feature type to the RasterCellValueCalculator:A input port.从RasterSlopeCalculator:输出端口到RasterCellValueCalculator:B输入端口:
4.Open the parameters dialog for the RasterCellValueCalculator.只需将操作参数更改为+选项即可;i.e.这会将原始数据(表示高程)添加到转换数据(表示坡度)中。The result will represent the suitability of each cell for building development:
较浅的颜色表示同时具有陡坡和较高海拔的单元。Darker colors represent cells that have both a shallow slope and a low elevation.
© 2019 亚搏在线Safe Software Inc |Legal