ArcGIS Desktop

  • ドキュメント
  • サポート

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

-

Spatial Analyst のライセンスで利用可能。

  • サマリー
  • 図
  • 使用法
  • 構文
  • コードのサンプル
  • 環境
  • ライセンス情報

サマリー

Changes the sign of the cell values (multiplies by -1) of the input raster on a cell-by-cell basis.

図

Negate illustration
OutRas = -Raster("InRas1")

説明

ラスター入力で演算子を使用すると、結果はラスターになります。ただし、すべての入力値が数字の場合、結果は数字になります。

複数の演算子が式に使用されている場合、それらは必ずしも左から右へという順に実行されるわけではありません。優先順位値が最も高い演算子が最初に実行されます。演算子の優先順位に関する詳細については、「演算子の優先順位のテーブル」をご参照ください。実行順序の制御には、括弧が使用できます。

If the input is integer, the output will be integer. If the input is floating point, the output will be floating point.

構文

- in_raster_or_constant
オペランド説明データ タイプ
in_raster_or_constant

The input raster to be negated (multiplied by -1).

Raster Layer | Constant

戻り値

名前説明データ タイプ
out_raster

出力ラスター オブジェクト。

The cell values are the input values negated (multiplied by -1).

Raster

コードのサンプル

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.sa import *
env.workspace = "C:/sapyexamples/data"
outNegate = - Raster("degs")
outNegate.save("C:/sapyexamples/output/outneg")
Unary - (Negate) example 2 (stand-alone script)

This sample changes the sign of the values in the input raster.

# Name: Op_Negate_Ex_02.py
# Description: Changes the sign (multiplies by -1) of the cell values
#              of 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
outNegate = -(inRaster)

# Save the output 
outNegate.save("C:/sapyexamples/output/outnegate")

環境

  • セル サイズ
  • 現在のワークスペース
  • マスク
  • 出力データの座標系
  • 範囲
  • テンポラリ ワークスペース
  • スナップ対象ラスター

関連トピック

  • An overview of the Map Algebra Operators

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS プラットフォーム

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

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
© Copyright 2016 Environmental Systems Research Institute, Inc. | プライバシー | リーガル