ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

>>

Disponible con una licencia de Spatial Analyst.

  • Resumen
  • Ilustración
  • Uso
  • Sintaxis
  • Muestra de código
  • Entornos
  • Información de licenciamiento

Resumen

Performs a Bitwise Right Shift operation on the binary values of two input rasters.

Ilustración

>> (Bitwise Right Shift) illustration
OutRas = Raster("InRas1") >> 1

Debate

Cuando se utiliza un operador con una entrada ráster, el resultado será un ráster. Sin embargo, si todas las entradas son números, entonces el resultado es un número.

Cuando se utilizan varios operadores en una expresión, no necesariamente se ejecutan en orden de izquierda a derecha. El operador con el valor de jerarquía más alta se ejecutará primero. Para obtener más información sobre la jerarquía del operador, consulte la tabla jerarquía del operador. Puede utilizar paréntesis para controlar el orden de ejecución.

The bitwise operators work on 32-bit integers.

If floating-point values are input, they are converted to integer values through truncation before the bitwise operation is performed. The output values are always integer.

Two inputs (rasters or numbers) are necessary for the bitwise operation to take place.

The order of input is relevant in the Bitwise Right Shift operation.

Binary values are stored in two's complement.

The leftmost bit position is reserved for the sign of the value (positive or negative). If the integer is positive, the bit position is zero; if it's negative, the bit position is one.

The Bitwise Right Shift operation does no wrapping of bits. The rightmost bit is dropped.

Another way to perform the Bitwise Right Shift operation is a >>= b which is an alternative way to write a = a >> b.

Sintaxis

in_raster_or_constant1 >> in_raster_or_constant2
OperandoExplicaciónTipo de datos
in_raster_or_constant1

El ráster de entrada en el cual se realiza el cambio.

La entrada puede ser entera o punto flotante, pero los valores de puntos flotantes se convertirán en enteros antes de que se realice la operación de bit a bit.

If the first input is a raster and the second is a scalar, an output raster is created with each input raster value being bitwise right shifted by the scalar value.

Raster Layer | Constant
in_raster_or_constant2

The input raster defining the number of positions to shift the bits.

La entrada puede ser entera o punto flotante, pero los valores de puntos flotantes se convertirán en enteros antes de que se realice la operación de bit a bit.

If the first input is a scalar and the second is a raster, an output raster is created with each input raster value defining the bitwise right shift for the scalar value.

Raster Layer | Constant

Valor de retorno

NombreExplicaciónTipo de datos
out_raster

El objeto ráster de salida.

The cell values are the result of a Bitwise Right Shift operation on the inputs.

Raster

Muestra de código

>> (Bitwise Right Shift) example 1 (Python window)

This sample performs a Bitwise Right Shift operation on two input rasters.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outBitwiseRShift = Raster("degs") >> Raster("negs")
outBitwiseRShift.save("C:/sapyexamples/output/outbitrs")
>> (Bitwise Right Shift) example 2 (stand-alone script)

This sample performs a Bitwise Right Shift operation on two input rasters.

# Name: Op_BitwiseRightShift_Ex_02.py
# Description: Performs a Bitwise Right Shift operation on the binary
#              values of two input rasters
# 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
inRaster1 = Raster("degs")
inRaster2 = Raster("negs")

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

# Execute BitwiseRightShift
outBitwiseRShift = inRaster1 >> inRaster2

# Save the output 
outBitwiseRShift.save("C:/sapyexamples/output/outbitrshift.img")

Entornos

  • Tamaño de celda
  • Espacio de trabajo actual
  • Máscara
  • Sistema de coordenadas de salida
  • Extensión
  • Espacio de trabajo temporal
  • Alinear ráster

Temas relacionados

  • An overview of the Map Algebra Operators

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

ArcGIS

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

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2021 Esri. | Privacidad | Legal