ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Converting output in radians to degrees for trigonometric tools

Available with Spatial Analyst license.

The output values from certain trigonometric tools are in radians. To convert them to degrees, the values need to be multiplied by a conversion factor of 180/pi, or approximately 57.2958.

In Python, this conversion can be done in the expression directly, or you can define a variable to store the value once and reuse it as needed. Using the ACos tool as an example, the syntax could be in the following form:

>>> import math
>>> from arcpy.sa import *
>>> OutRas = ACos (InRas) * 180.0 / math.pi
Or, you can use a variable for the conversion factor:
>>> import math
>>> rad2deg = 180.0 / math.pi
>>> from arcpy.sa import *
>>> OutRas = ACos (InRas) * rad2deg

The following illustrations demonstrate the results of converting the output values from radians to degrees.

Note:

The variable defined in the example above will be used in these examples.

Examples of converting trigonometric outputs in radians to degrees

Tool

Illustration and Python syntax

ACos
ACos illustration with output converted from Radians to Degrees
OutRas = ACos(InRas) * rad2deg
ASin
ASin illustration with output converted from Radians to Degrees
OutRas = ASin(InRas) * rad2deg
ATan
ATan illustration with output converted from Radians to Degrees
OutRas = ATan(InRas) * rad2deg

Related Topics

  • An overview of the Trigonometric Math toolset
  • ACos
  • ASin
  • ATan
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal