How to use Deg2rad function?

378
1
05-03-2011 06:36 PM
majidMoradmand
New Contributor
Dear All
I need to convert my slope raster from Degree to Radian.the instruction is in the help,as follow:
>>> import math
>>> deg2rad = math.pi / 180.0
>>> from arcpy.sa import *
>>>outras = cos ( inras * deg2rad )
but it give me an error.I don't know how to introduce inras and outras.
I really appreciate if some one could explain the procedure.
thx
Tags (2)
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus
the link is
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000ns000000.htm
the error is associated with your small-case cos instead of the capitalized Cos (always specify the exact error)
Inras would be your input raster and Outras would be your output raster...and so on
0 Kudos