Make NetCDF Feature Layer (Multidimension) |
|
Release 9.2
Last modified November 9, 2006 |
![]() ![]() ![]() Print all topics in : "Tools" |
Makes an in-memory feature layer from a netCDF file.
Usage tips
The feature layer can be used as input to any geoprocessing tool that accepts a feature class as input.
The temporary feature layer can be saved as a layer file using the Save To Layer File tool or saved as a new feature class using the Copy Features tool.
Layers created in ArcCatalog cannot be used in ArcMap unless they are saved to a layer file using the Save To Layer File tool.
An existing feature layer will be overwritten if the same layer name is specified.
Auxiliary coordinate variables are listed in the X Variable and Y Variable dropdown lists and used during execution if specified. They are not listed in the Dimension Values parameter dropdown list and cannot be set as the value of this parameter at the command line or in a script.
The number of features in the layer is the same as the number of unique values in the row dimension. If multiple dimensions are selected, then the number of records is the product of the number of unique values in those dimensions.
Only one feature is created when a row dimension is not specified.
The type of field is determined by the netCDF variable type.
The first value of a non-row dimension is used to create a default view of a multidimensional variable.
The calendar attribute values noleap and 365_day, assigned to the time coordinate variable of the netCDF file, are not honored in ArcGIS.
The following environment settings affect this tool: workspace and scratch workspace.
Command line syntax
An overview of the Command Line window
MakeNetCDFFeatureLayer_md <in_netcdf_file> <variable;variable...> <x_variable> <y_variable> <out_feature_layer> {row_dimension;row_dimension...} {z_variable} {m_variable} {dimension {value};dimension {value}...} {BY_VALUE | BY_INDEX}
Parameter | Explanation | Data Type |
<in_netcdf_file> |
The input netCDF file. |
File |
<variable;variable...> |
The netCDF variable, or variables, that will be added as fields in the feature attribute table. |
String |
<x_variable> |
A netCDF coordinate variable used to define the x, or longitude coordinates of the output layer. |
String |
<y_variable> |
A netCDF coordinate variable used to define the y, or latitude coordinates of the output layer. |
String |
<out_feature_layer> |
The name of the output feature layer. |
Feature Layer |
{row_dimension;row_dimension...} |
The netCDF dimension, or dimensions, used to create features with unique values in the feature layer. The dimension or dimensions set here determine the number of features in the feature layer and the fields that will be presented in the feature layer's attribute table. For instance, if StationID is a dimension in the netCDF file and has 10 values, by setting StationID as the dimension to use, 10 features will be created (10 rows will be created in the feature layer's attribute table). If StationID and time are used, and there are 3 time slices, 30 features will be created (30 rows will be created in the feature layer's attribute table). If you will be animating the netCDF feature layer, it is recommended, for efficiency reasons, to not set time as a row dimension. Time will still be available as a dimension that you can set to animate through, but the attribute table will not store this information. |
String |
{z_variable} |
A netCDF variable used to specify elevation values (z-values) for features. |
String |
{m_variable} |
A netCDF variable used to specify linear measurement values (m-values) for features. |
String |
{dimension {value};dimension {value}...} |
The value (such as 01/30/05) of the dimension (such as Time) or dimensions to use when displaying the variable in the output layer. By default, the first value of the dimension or dimensions will be used. This default value can also be altered on the netCDF tab of the Layer Properties dialog box. |
(String String; String String;...) |
{BY_VALUE | BY_INDEX} |
Specifies the dimension value selection method.
|
String |
MakeNetCDFFeatureLayer C:\Data\River.nc "Waterlevel; Discharge" lon lat river_Layer StationId # chainage #
Scripting syntax
About getting started with writing geoprocessing scripts
MakeNetCDFFeatureLayer_md (in_netcdf_file, variable, x_variable, y_variable, out_feature_layer, row_dimension, z_variable, m_variable, dimension_values, value_selection_method)
Parameter | Explanation | Data Type |
in_netcdf_file (Required) |
The input netCDF file. |
File |
variable (Required) |
The netCDF variable, or variables, that will be added as fields in the feature attribute table. |
String |
x_variable (Required) |
A netCDF coordinate variable used to define the x, or longitude coordinates of the output layer. |
String |
y_variable (Required) |
A netCDF coordinate variable used to define the y, or latitude coordinates of the output layer. |
String |
out_feature_layer (Required) |
The name of the output feature layer. |
Feature Layer |
row_dimension (Optional) |
The netCDF dimension, or dimensions, used to create features with unique values in the feature layer. The dimension or dimensions set here determine the number of features in the feature layer and the fields that will be presented in the feature layer's attribute table. For instance, if StationID is a dimension in the netCDF file and has 10 values, by setting StationID as the dimension to use, 10 features will be created (10 rows will be created in the feature layer's attribute table). If StationID and time are used, and there are 3 time slices, 30 features will be created (30 rows will be created in the feature layer's attribute table). If you will be animating the netCDF feature layer, it is recommended, for efficiency reasons, to not set time as a row dimension. Time will still be available as a dimension that you can set to animate through, but the attribute table will not store this information. |
String |
z_variable (Optional) |
A netCDF variable used to specify elevation values (z-values) for features. |
String |
m_variable (Optional) |
A netCDF variable used to specify linear measurement values (m-values) for features. |
String |
dimension_values (Optional) |
The value (such as 01/30/05) of the dimension (such as Time) or dimensions to use when displaying the variable in the output layer. By default, the first value of the dimension or dimensions will be used. This default value can also be altered on the netCDF tab of the Layer Properties dialog box. |
(String String; String String;...) |
value_selection_method (Optional) |
Specifies the dimension value selection method.
|
String |
# MakeNetCDFFeatureLayer.py # Description: Create a feature layer from a netCDF file. # Requirements: None # Author: ESRI # Create the Geoprocessor object import arcgisscripting, sys, string, os gp = arcgisscripting.create() try: # Set local variables InNetCDFFile = "D:/NetCDFSupport/NetCDFScriptSamples/Data/River.nc" InVariables = "Waterlevel; Discharge" InXVariable = "lon" InYVariable = "lat" OutFeatureLayer = "river_Layer" InRowDimensions = "StationId" InZVariable = "" InMVariable = "chainage" InDefaultValues = "" # Process: MakeNetCDFFeatureLayer gp.MakeNetCDFFeatureLayer (InNetCDFFile, InVariables, InXVariable, InYVariable, OutTableView, InRowDimensions, InDefaultValues) except: # Print error message if an error occurs print gp.GetMessages()