ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

+

Available with Spatial Analyst license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Multiplies each cell value of the input raster on a cell-by-cell basis by 1.

Illustration

Negate illustration
OutRas = + Raster("InRas1")

Discussion

When using an operator with a raster input the result will be a raster. However, if all inputs are numbers, then the result is a number.

When multiple operators are used in an expression, they are not necessarily executed in left-to-right order. The operator with the highest precedence value will be executed first. For more information on operator precedence, see operator precedence table. You can use parentheses to control the execution order.

If the input is integer, the output will contain integer values; if the input is floating point, the output will contain floating-point values.

Syntax

+ in_raster_or_constant
OperandExplanationData Type
in_raster_or_constant

The input raster to apply the Unary Plus operator (multiply by 1).

Raster Layer | Constant

Return Value

NameExplanationData Type
out_raster

The output raster object.

The cell values are the input values multiplied by 1.

Raster

Code sample

Unary + (Unary Plus) example 1 (Python window)

This sample applies the Unary Plus operator to the input raster.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outUnaryPlus = + Raster("degs")
outUnaryPlus.save("C:/sapyexamples/output/outdeg")
Unary + (Unary Plus) example 2 (stand-alone script)

This sample applies the Unary Plus operator to the input raster.

# Name: Op_UnaryPlus_Ex_02.py
# Description: Returns the cell valuesof the input raster on a cell-by-cell 
#    basis. 
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inRaster = Raster("degs")

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute Negate
outUnaryPlus = +(inRaster)

# Save the output 
outUnaryPlus.save("C:/sapyexamples/output/outunplus")

Environments

  • Cell Size
  • Current Workspace
  • Mask
  • Output Coordinate System
  • Extent
  • Scratch Workspace
  • Snap Raster

Related topics

  • An overview of the Map Algebra Operators

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal