Show Navigation | Hide Navigation
You are here:
Extensions > Spatial Analyst > Spatial Analyst functional reference > Math General (Spatial Analyst)

Exp

Release 9.3
Last modified September 7, 2011
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Math General (Spatial Analyst)"


Related Topics

Calculates the base e exponential of cells in a raster.


Illustration

Illustration 1:
Exp illustration (example 1)
Map Algebra:
OutRas = Exp(InRas1)
Command Line:
Exp_sa InRas1 OutRas

Illustration 2:
Exp illustration (example 2)
Map Algebra:
OutRas = Exp(InRas1)
Command Line:
outRas = Exp("InRas1")

Usage tips

Command line syntax
An overview of the Command Line window
Exp_sa <in_raster_or_constant> <out_raster>

Parameter Explanation Data Type
<in_raster_or_constant>

Input raster or constant value for which to find the base e exponential.

Composite Geodataset
<out_raster>

The raster to be created.

Raster Dataset
Data types for geoprocessing tool parameters


Command line example

Exp_sa C:/data/ras_1 C:/data/final_1

Scripting syntax
About getting started with writing geoprocessing scripts
Exp_sa (in_raster_or_constant, out_raster)

Parameter Explanation Data Type
in_raster_or_constant (Required)

Input raster or constant value for which to find the base e exponential.

Composite Geodataset
out_raster (Required)

The raster to be created.

Raster Dataset

Data types for geoprocessing tool parameters


Script example

# Exp_sample.py
# Description: 
#   Calculates the base e exponential of the input on a 
#   cell-by-cell basis.
# Requirements: None
# Author: ESRI
# Date: Sept 6, 2005
# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set the input raster dataset
    inputRaster = "C:/data/ras_1"

    # Set the output raster name
    outputRaster = "C:/data/final_1"

    # Check out Spatial Analyst extension license
    gp.CheckOutExtension("Spatial")

    # Process: Exp
    gp.Exp_sa(inputRaster, outputRaster)

except:
    # If an error occurred while running a tool, then print the messages.
    print gp.GetMessages()

Map Algebra syntax
Exp(<grid | number>)

Parameter Explanation
(<grid | number>) The input to the function.
  • grid  — An input integer or floating-point raster or an expression resulting in a raster.
  • number  — Any integer or floating-point value or an expression resulting in a number.

Map Algebra example

exp(ingrid)
exp(ingrid1 + ingrid2)
exp(ingrid1 div pi)

ArcObjects syntax
IMathOp::Exp (geoDataset As IGeoDataset) As IGeoDataset

Parameter Explanation
geoDataset An input Raster, RasterDataset, RasterBand, or RasterDescriptor for which to find the base e exponential.

ArcObjects example

' Create the RasterMathOps object
Dim pMathOp As IMathOp
Set pMathOp = New RasterMathOps

' Declare the input raster object
Dim pInputDataset As IGeoDataset

' Calls function to open a raster dataset from disk
Set pInputDataset = OpenRasterDataset ("D:\SpatialData", "inputraster")

' Declare the output raster object
Dim pOutputRaster As IGeoDataset

' Calls the method
Set pOutputRaster = pMathOp.Exp (pInputDataset)

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.