ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

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

ArcGIS Online

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

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

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

NetCDFFileProperties

  • 概要
  • 構文
  • 手法の概要
  • 手法
  • コードのサンプル

概要

The network Common Data Form (netCDF) is a binary, self-describing, machine-independent file format for storing scientific data.

Learn more about netCDF

構文

 NetCDFFileProperties (netcdffile)
パラメーター説明データ タイプ
netcdffile

The input netCDF file.

String

手法の概要

手法説明
getAttributeNames ({variable_name})

Returns the attribute names of a variable in a netCDF file.

getAttributeValue (variable_name, attribute_name)

Returns the value of an attribute.

getDimensionIndex (dimension_name, value)

Returns the dimension index.

getDimensionSize (dimension_name)

Returns the dimension size.

getDimensionValue (dimension_name, index)

Returns the dimension value.

getDimensions ()

Returns the dimensions.

getDimensionsByVariable (variable_name)

Returns the dimensions by variable.

getFieldType (name)

Returns the field type of a variable or dimension.

getSpatialReference (variable_name, x_dimension, y_dimension)

Returns the spatial reference of a variable.

getVariables ()

Returns the variables.

getVariablesByDimension (dimension_name)

Returns the variables by dimension.

手法

getAttributeNames ({variable_name})
パラメーター説明データ タイプ
variable_name
[variable_name,...]

A variable name of the netCDF file.

String

戻り値

データ タイプ説明
String

The attribute names of the variable.

getAttributeValue (variable_name, attribute_name)
パラメーター説明データ タイプ
variable_name

A variable name of the netCDF file.

String
attribute_name

An attribute name of the netCDF file.

String

戻り値

データ タイプ説明
Object

The value of the attribute. The type of returned value depends on the dimension type.

getDimensionIndex (dimension_name, value)
パラメーター説明データ タイプ
dimension_name

A dimension name of the netCDF file.

String
value

The dimension value.

Integer

戻り値

データ タイプ説明
Integer

The dimension index.

getDimensionSize (dimension_name)
パラメーター説明データ タイプ
dimension_name

A dimension name of the netCDF file.

String

戻り値

データ タイプ説明
Integer

The dimension size.

getDimensionValue (dimension_name, index)
パラメーター説明データ タイプ
dimension_name

A dimension name of the netCDF file.

String
index

The index position.

Integer

戻り値

データ タイプ説明
Object

The dimension value. The type of returned value depends on the dimension type.

getDimensions ()

戻り値

データ タイプ説明
String

A list of dimensions.

getDimensionsByVariable (variable_name)
パラメーター説明データ タイプ
variable_name

A variable name of the netCDF file.

String

戻り値

データ タイプ説明
String

The dimensions by variable.

getFieldType (name)
パラメーター説明データ タイプ
name

A variable or dimension name of the netCDF file.

String

戻り値

データ タイプ説明
String

The field type.

getSpatialReference (variable_name, x_dimension, y_dimension)
パラメーター説明データ タイプ
variable_name

A variable name of the netCDF file.

String
x_dimension

The x-dimension.

Integer
y_dimension

The y-dimension.

Integer

戻り値

データ タイプ説明
SpatialReference

The spatial reference of a variable.

getVariables ()

戻り値

データ タイプ説明
String

A list of variables.

getVariablesByDimension (dimension_name)
パラメーター説明データ タイプ
dimension_name

A variable name of the netCDF file.

String

戻り値

データ タイプ説明
String

The list of variables by dimension.

コードのサンプル

NetCDFFileProperties example

Display properties of netCDF file.

import arcpy

in_netcdf = "c:/netCDF/crwr.nc"

nc_fp = arcpy.NetCDFFileProperties(in_netcdf)

# Get Variables
for nc_var in nc_fp.getVariables():
    print("Variable: {}".format(nc_var))
    print("\tVariable type: {}".format(nc_fp.getFieldType(nc_var)))

    # Get dimensions by variable
    for nc_dim_by_var in nc_fp.getDimensionsByVariable(nc_var):
        print("Dimension: {}".format(nc_dim_by_var))
    print(nc_fp.getAttributeValue(nc_var, "units"))

    # Get Variable Attributes
    for nc_va_name in nc_fp.getAttributeNames(nc_var):
        print("Attribute Name: {}".format(nc_va_name))

# Get Dimensions
for nc_dim in nc_fp.getDimensions():
    print("Dimension: {}".format(nc_dim))
    print("\tDimension size: {}".format(nc_fp.getDimensionSize(nc_dim)))
    print("\tDimension type: {}".format(nc_fp.getFieldType(nc_dim)))

    for i in range(0, nc_fp.getDimensionSize(nc_dim)):
        nc_dim_value = nc_fp.getDimensionValue(nc_dim, i)
        print("\tDimension value: {}".format(nc_dim_value))
        print("\tDimension index: {}".format(
            nc_fp.getDimensionIndex(nc_dim, nc_dim_value)))

    # Get Variable by dimension
    for nc_vars_by_dim in nc_fp.getVariablesByDimension(nc_dim):
        print("\tVariable by dimension: {}".format(nc_vars_by_dim))

# Get Global Attribues
for nc_att_name in nc_fp.getAttributeNames(""):
    print("Attribute Name: {}".format(nc_att_name))
    print(nc_fp.getAttributeValue("", nc_att_name))

関連トピック

  • Python でのクラスの使用
  • 空間参照クラスを使用する

ArcGIS Desktop

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

ArcGIS

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

Esri について

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