Available with Spatial Analyst license.
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.
- Operators or tools that result in a raster return a raster object. In this case, the Raster 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.
For additional examples of how the referenced dataset for a raster object can become permanent, see Interaction of the raster object.
outSlope = Slope("indem") outSlope.save("sloperaster")
For more information on the raster object and its properties and methods, see Work with raster objects.
- 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.
# An empty string, "", indicates the use of a default value 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")
- Some tools in the ArcGIS Spatial Analyst extension do not output a raster, such as Contour. These tools express the output as a parameter within the parentheses in the tool definition.
Contour("elevation", "C:/sapyexamples/output/outcontours.shp", 200, 0)