Creating output
All Map Algebra tools and operators produce output. For most Map Algebra tools and operators, a raster object is the output to the left of an equal sign.
Output rules
- Operators or tools that result in a raster produces a raster object identified to the left of an equal sign. In this case theRaster object points to a temporary raster dataset .
outSlope = Slope("indem")
- The output raster object created from one statement can be directly used in subsequent statements.
outDirection = FlowDirection("inelevation") outAccumulation = FlowAccumulation(outDirection)
- The referenced raster dataset of the resultant raster object is temporary and will be removed from disk when the ArcGIS session is ended. You can save the referenced raster dataset permanently by calling the save method on the raster object.
outSlope = Slope("indem") outSlope.save("sloperaster")
For more information on the raster object and its properties and methods, see Creating a raster object.
- When a tool can create more than one output, the optional output will be expressed as tool parameters within parentheses to the right of the equal sign. Optional raster outputs are permanent datasets on disk; they are not raster objects.
# Empty "" indicate use the default values for the parameter. # In the following statement the defaults are taken for # maximum_distance and cell_size parameters. outdirection will be a # a permanent raster stored in the current workspace outDistance = EucDistance("input", "", "", "outdirection")
- Spatial Analyst tools that do not output a raster will express the output as a parameter within the parentheses in the tool definition.
Contour("elevation", "C:/sapyexamples/output/outcontours.shp", 200, 0)
相关主题
7/10/2012