サマリー
Represents the rate of change of elevation for each pixel.
説明
For more information about how this function works, see the 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.
構文
Slope (dem, {z_factor}, {slope_type}, {ps_power}, {psz_factor}, {remove_edge_effect})
パラメーター | 説明 | データ タイプ |
dem | The input elevation raster. | Raster |
z_factor | The z-factor is a scaling factor used to convert the elevation values for two purposes:
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. (デフォルト値は次のとおりです 1) | Double |
slope_type | The inclination of slope can be output as either a value in degrees, or percent rise. Specify one of the following: DEGREE, PERCENTRISE, or SCALED. For more information, see Slope function. (デフォルト値は次のとおりです DEGREE) | String |
ps_power | Accounts for the altitude changes (or scale) as the viewer zooms in and out on the map display. It is the exponent applied to the pixel size term in the equation that controls the rate at which the z-factor changes to avoid significant loss of relief. This parameter is only valid when the slope_type is SCALED. (デフォルト値は次のとおりです 0.664) | Double |
psz_factor | Accounts for changes in scale as the viewer zooms in and out on the map display. The value controls the rate at which the z-factor changes. This parameter is only valid when the slope_type is SCALED. (デフォルト値は次のとおりです 0.024) | Double |
remove_edge_effect |
Using this option will avoid any resampling artifacts that may occur along the edges of a raster. The output pixels along the edge of a raster or beside pixels without a value will be populated with NoData; therefore, it is recommended that this option be used only when there are other rasters with overlapping pixels available. When overlapping pixels are available, these areas of NoData will display the overlapping pixel values instead of being blank.
(デフォルト値は次のとおりです False) | Boolean |
データ タイプ | 説明 |
Raster | The output raster. |
コードのサンプル
This example calculates the slope for a given elevation.
from arcpy.ia import *
out_slope_raster = Slope("elevation.tif")
out_slope_raster.save("C:/arcpyExamples/outputs/slope.tif")
This example calculates the slope for a given elevation.
# 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_dem = "elevation.tif"
# Execute the Slope function
out_slope_raster = Slope(in_raster)
# Save the output
out_slope_raster.save("C:/arcpyExamples/outputs/slope.tif")