ArcGIS Desktop

  • Documentación
  • Soporte

  • 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 for 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

NetCDFFileProperties

  • Resumen
  • Sintaxis
  • Vista general del método
  • Métodos
  • Muestra de código

Resumen

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

Learn more about netCDF

Sintaxis

 NetCDFFileProperties  (netcdffile)
ParámetroExplicaciónTipo de datos
netcdffile

The input netCDF file.

String

Vista general del método

MétodoExplicación
getAttributeNames ({variable_name})

Gets the attribute names of a variable in a NetCDF file.

getAttributeValue (variable_name, attribute_name)

Get the value of an attribute.

getDimensionIndex (dimension_name, value)

Gets the dimension index.

getDimensionSize (dimension_name)

Gets the dimension size.

getDimensionValue (dimension_name, index)

Gets the dimension value.

getDimensions ()

Gets the dimensions.

getDimensionsByVariable (variable_name)

Gets the dimensions by variable.

getFieldType (name)

Gets the field type of a variable or dimension.

getSpatialReference (variable_name, x_dimension, y_dimension)

Gets the spatial reference of a variable.

getVariables ()

Gets the variables.

getVariablesByDimension (dimension_name)

Get the variables by dimension.

Métodos

getAttributeNames ({variable_name})
ParámetroExplicaciónTipo de datos
variable_name
[variable_name,...]

Variable name of the NetCDF file.

String

Valor de retorno

Tipo de datosExplicación
String

The attribute names of the variable.

getAttributeValue (variable_name, attribute_name)
ParámetroExplicaciónTipo de datos
variable_name

Variable name of the netCDF file.

String
attribute_name

Attribute name of the netCDF file.

String

Valor de retorno

Tipo de datosExplicación
Object

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

getDimensionIndex (dimension_name, value)
ParámetroExplicaciónTipo de datos
dimension_name

Dimension name of the NetCDF file.

String
value

The dimension value.

Integer

Valor de retorno

Tipo de datosExplicación
Integer

The dimension index.

getDimensionSize (dimension_name)
ParámetroExplicaciónTipo de datos
dimension_name

Dimension name of the NetCDF file.

String

Valor de retorno

Tipo de datosExplicación
Integer

The dimension size.

getDimensionValue (dimension_name, index)
ParámetroExplicaciónTipo de datos
dimension_name

Dimension name of the NetCDF file.

String
index

The index position.

Integer

Valor de retorno

Tipo de datosExplicación
Object

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

getDimensions ()

Valor de retorno

Tipo de datosExplicación
String

List of dimensions.

getDimensionsByVariable (variable_name)
ParámetroExplicaciónTipo de datos
variable_name

Variable name of the NetCDF file.

String

Valor de retorno

Tipo de datosExplicación
String

The dimensions by variable.

getFieldType (name)
ParámetroExplicaciónTipo de datos
name

Variable or dimension name of the NetCDF file.

String

Valor de retorno

Tipo de datosExplicación
String

The field type.

getSpatialReference (variable_name, x_dimension, y_dimension)
ParámetroExplicaciónTipo de datos
variable_name

Variable name of the NetCDF file.

String
x_dimension

The x-dimension.

Integer
y_dimension

The y-dimension.

Integer

Valor de retorno

Tipo de datosExplicación
SpatialReference

The spatial reference of a variable.

getVariables ()

Valor de retorno

Tipo de datosExplicación
String

List of variables.

getVariablesByDimension (dimension_name)
ParámetroExplicaciónTipo de datos
dimension_name

Variable name of the netCDF file

String

Valor de retorno

Tipo de datosExplicación
String

List of variables by dimension

Muestra de código

NetCDFFileProperties example

Display properties of NetCDF file.

import arcpy

in_netcdf = "c:/NetCDF/crwr.nc"
try:
    nc_fp = arcpy.NetCDFFileProperties(in_netcdf)

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

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

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

    # Get Dimensions
    for nc_dim in nc_fp.getDimensions():
        print("Dimension: {0}".format(nc_dim))
        print("\tDimension size: {0}".format(nc_fp.getDimensionSize(nc_dim)))
        print("\tDimension type: {0}".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: {0}".format(nc_dim_value))
            print("\tDimension index: {0}".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: {0}".format(nc_vars_by_dim))

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

except Exception as err:
    print(err)

Temas relacionados

  • Utilizar clases en Python
  • Utilizar la clase de referencia espacial

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

Plataforma ArcGIS

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

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog interno
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacidad | Legal