Feature To NetCDF (Multidimension) |
|
Release 9.2
Last modified November 9, 2006 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts a point featureclass to a netCDF file.
Usage tips
The default variable name is the same as the field name specified in the field_to_variable parameter.
The type of variable is the same as the type of field.
Special fields Shape.X and Shape.Y are always available in the drop-down list. They can be used for specifying variable names for x-coordinates and y-coordinates, respectively. If variable names are not specified or Shape.X and Shape.Y are not added to the list, the x- and y-coordinates are exported with default variable names. The default variable names for Shape.X and Shape.Y are lon and lat, respectively, when the feature is in geographic coordinate system. In all other cases, the default variable names for Shape.X and Shape.Y are x and y, respectively.
Special fields Shape.Z and Shape.M are available for features with Z and M values. To export Z and M values, you must add Shape.Z and Shape.M to the list. The default variable names for Shape.Z and Shape.M are z and m, respectively.
The default dimension name is the same as the field name specified in the field_to_dimension parameter.
The size of a dimension is equal to the number of unique values in the respective field.
If no field is specified as a row dimension, then a dimension RecordID is created in the output netCDF file with a size equal to the number of features.
The following environment settings affect this tool: workspace and scratch workspace.
Command line syntax
An overview of the Command Line window
FeatureToNetCDF_md <in_features> <field {variable} {units}; field {variable} {units}...> <out_netCDF_file> {field {dimension} {units}; field {dimension} {units}...}
Parameter | Explanation | Data Type |
<in_features> |
The input feature class. |
Feature Layer |
<field {variable} {units}; field {variable} {units}...> |
The field or fields used to create variables in the netCDF file. Four special fields, Shape.X, Shape.Y, Shape.Z, and Shape.M are available in the drop-down list. They can be used for exporting x-coordinates or longitude, y-coordinates or latitude, Z values, and M values of input features, respectively.
|
(String String String; String String String;...) |
<out_netCDF_file> |
The output netCDF file. The filename must have a .nc extension. |
File |
{field {dimension} {units}; field {dimension} {units}...} |
The field or fields used to create dimensions in the netCDF file.
|
(String String String; String String String;...) |
FeatureToNetCDF C:\Data\WLStations.shp "Shape.X xc; Shape.Y yc; Shape.M chainame mile; WL WaterLevel meter; Q Discharge" D:\Data\HydroFile.nc StationID
Scripting syntax
About getting started with writing geoprocessing scripts
FeatureToNetCDF_md (in_features, fields_to_variables, out_netCDF_file, fields_to_dimensions)
Parameter | Explanation | Data Type |
in_features (Required) |
The input feature class. |
Feature Layer |
fields_to_variables (Required) |
The field or fields used to create variables in the netCDF file. Four special fields, Shape.X, Shape.Y, Shape.Z, and Shape.M are available in the drop-down list. They can be used for exporting x-coordinates or longitude, y-coordinates or latitude, Z values, and M values of input features, respectively.
|
(String String String; String String String;...) |
out_netCDF_file (Required) |
The output netCDF file. The filename must have a .nc extension. |
File |
fields_to_dimensions (Optional) |
The field or fields used to create dimensions in the netCDF file.
|
(String String String; String String String;...) |
# FeatureToNetCDF.py # Description: Converts a feature class to a netCDF file. # Requirements: None # Author: ESRI # Create the Geoprocessor object import arcgisscripting, sys, string, os gp = arcgisscripting.create() try: # Set local variables InFeatures = "C:\Data\WLStations.shp" InFieldToVariable = "Shape.X xc; Shape.Y yc; Shape.M chainame mile; WL WaterLevel meter; Q Discharge" OutNetCDFFile = "D:\Data\HydroFile.nc" InFieldToDimension = "StationID" # Process: FeatureToNetCDF gp.FeatureToNetCDF (InFeatures, InFieldToVariable, OutNetCDFFile, InFieldToDimension) except: # Print error message if an error occurs print gp.GetMessages()