AspectSlope
サマリー
Creates a raster object that simultaneously displays the aspect and slope of a surface.
ディスカッション
For more information about how this function works, see the Aspect Slope raster function.
The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.
構文
AspectSlope(raster, {z_factor})
| パラメーター | 説明 | データ タイプ |
|---|---|---|
|
raster |
The input elevation raster. |
Raster |
|
z_factor |
The
If the x,y units and z units are in the same units of measure, the z-factor should be set to 1. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface. The default value is 1. |
Double |
戻り値
| データ タイプ | 説明 |
|---|---|
|
Raster |
The output raster. |
コードのサンプル
This example calculates the aspect and slope of the raster.
from arcpy.ia import *
out_aspectslope_raster = AspectSlope("elevation.tif", 3)
out_aspectslope_raster.save("C:/arcpyExamples/outputs/aspectslope.tif")
This example calculates the aspect and slope of the raster.
# Import the system modules
import arcpy
from arcpy.ia import *
# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"
# Set the local variables
in_raster = "elevation.tif"
# Run the AspectSlope function
out_aspectslope_raster = AspectSlope(in_raster, 3)
# Save the output
out_aspectslope_raster.save("C:/arcpyExamples/outputs/aspectslope.tif")