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") # Execute Negate outNegate = -(inRaster) # Save the output outNega...
in_raster_or_constant 要取反的输入栅格(乘以 -1)。 Raster Layer | Constant代码示例 一元-(取反)示例 1(Python 窗口) 本示例更改输入栅格值的符号。 import arcpy from arcpy import env from arcpy.ia import * env.workspace = "C:/iapyexamples/data" outNegate = - Raster("degs") outNegate.save...
in_raster_or_constant 要取反的输入栅格(乘以 -1)。 Raster Layer | Constant 代码示例 一元-(取反)示例 1(Python 窗口) 本示例更改输入栅格值的符号。 importarcpyfromarcpyimportenvfromarcpy.saimport* env.workspace ="C:/sapyexamples/data"outNegate = - Raster("degs") outNegate.save("C:/sapyexam...
In Map Algebra ist das entsprechende Operatorsymbol für dieses Werkzeug "-" (Link). Weitere Informationen zur Geoverarbeitung von Umgebungen mit diesem Werkzeug finden Sie unter Analyseumgebungen und Spatial Analyst. Syntax Negate(in_raster_or_constant) Parameter Erklärung Datentyp in_raster_or...
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") # Execute Negate outNegate = -(inRaster) # Save the output outNega...
Унарный– (Сменитьзнак) Пример 1 (окно Python) Вданномпримереизменяетсязнакзначенийячееквходногорастра. importarcpyfromarcpyimportenvfromarcpy.saimport* env.workspace ="C:/sapyexamples/data...
PythonSpatial Analyst-ModulOperatorsArithmetic operatorsÜberblick über die Map Algebra-Operatoren Arithmetic operators + (Addition) + (Unary Plus) - (Subtraction) - (Negate) * (Multiplication) ** (Power) / (Division) // (Integer Division) % (Modulo) Bitwise operators Boolean operators ...
Unary - (Negate) example 1 (Python window) This sample changes the sign of the values in the input raster. import arcpy from arcpy import env from arcpy.ia import * env.workspace = "C:/iapyexamples/data" outNegate = - Raster("degs") outNegate.save("C:/iapyexamples/output/outneg") ...
Unary - (Negate) example 1 (Python window) This sample changes the sign of the values in the input raster. importarcpyfromarcpyimportenvfromarcpy.iaimport* env.workspace ="C:/iapyexamples/data"outNegate = - Raster("degs") outNegate.save("C:/iapyexamples/output/outneg") ...
When using an operator with a raster input, the result will be a raster. However, if all inputs are numbers, 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...