- Engine
- ArcGIS for Desktop Basic
- ArcGIS for Desktop Standard
- ArcGIS for Desktop Advanced
- Server
Additional library information: Contents, Object Model Diagram
The DataSourcesNetCDF library contains objects used for accessing NetCDF files and for creating rasters, features, or tables from netCDF variables in ArcGIS.
The main objects in this library are: NetCDFWorkspaceFactory, NetCDFWorkspace, NetCDFFeatureClassName, NetCDFTableName, NetCDFRasterDatasetName, NetCDFFeatureClass, NetCDFTable, NetCDFRasterDataset, and NetCDFRasterBand.
The recommended way to access NetCDF content is via Geoprocessing's Multidimension Tools toolbox.
See the following sections for more information about this namespace:
- NetCDFWorkspaceFactory and NetCDFWorkspace
- NetCDFFeatureClassName
- NetCDFTableName
- NetCDFRasterDatasetName
- NetCDFFeatureClass
- NetCDFTable
- NetCDFRasterDataset
- NetCDFRasterBand
NetCDFWorkspaceFactory and NetCDFWorkspace
To work with a NetCDF file, create a workspace factory using the NetCDFWorkspaceFactory class. After creating a new instance of the NetCDFWorkspaceFactory object, use the openFromFile method to get a NetCDFWorkspace object that is used to work with the data. See the following illustration:
You can also create a WorkspaceName and set its WorkspaceFactoryProgID and PathName to a NetCDF file. See the following code example:
[Java]
//Create a WorkspaceName.
WorkspaceName wsName = new WorkspaceName();
wsName.setWorkspaceFactoryProgID("esriDataSourcesNetCDF.NetCDFWorkspaceFactory");
wsName.setPathName("E:/GisData/crwr.nc");
NetCDFFeatureClassName
NetCDFFeatureClassName extends DatasetName. You can get a NetCDFFeatureClass instance by calling the open method on any NetCDFFeatureClassName instance. See the following illustration:
NetCDFFeatureclass implements IMDFeatureClassView. You can use the properties of the IMDFeatureClassView interface to specify the parameters required to create a NetCDF feature class from a NetCDF file. See the following code example:
[Java]
StrArray netCdfVariables = new StrArray();
netCdfVariables.add("elevation");
StrArray netCdfRowDimensions = new StrArray();
netCdfRowDimensions.add("lon");
netCdfRowDimensions.add("lat");
NetCDFFeatureClassName mdfcView = new NetCDFFeatureClassName();
mdfcView.setVariableList(netCdfVariables);
mdfcView.setXDimension("lon");
mdfcView.setYDimension("lat");
mdfcView.setRowDimensionList(netCdfRowDimensions);
NetCDFTableName
The NetCDFTableName object extends DatasetName. You can get a NetCDFTable instance by calling the open method on any NetCDFTableName instance. See the following illustration:
NetCDFTable implements IMDTableView. You can use the properties of the IMDTableView interface to specify the parameters required to create a NetCDF table view from a NetCDF file. See the following code example:
[Java]
StrArray netCdfVariables = new StrArray();
netCdfVariables.add("elevation");
StrArray netCdfDimensions = new StrArray();
netCdfDimensions.add("lon");
netCdfDimensions.add("lat");
NetCDFTableName mdtView = new NetCDFTableName();
mdtView.setVariableList(netCdfVariables);
mdtView.setDimensionList(netCdfRowDimensions);
NetCDFRasterDatasetName
NetCDFRasterDatasetName extends DatasetName. You can get a NetCDFRasterDataset instance by calling the open method on any NetCDFRasterName instance. See the following illustration:
NetCDFRasterDataset implements IMDRasterDatasetView. You can use the properties of the IMDRasterDatasetView interface to specify the parameters required to create a NetCDF raster dataset from a NetCDF file. See the following code example:
[Java]
//Specify the NetCDF raster dataset parameters
// using methods from the IMDRasterDatasetView interface.
NetCDFRasterDatasetName mdrdsView = new NetCDFRasterDatasetName();
mdrdsView.setVariable("elevation");
mdrdsView.setXDimension("lon");
mdrdsView.setYDimension("lat");
NetCDFFeatureClass
NetCDFFeatureClass extends FeatureClass. It implements IFeatureClass, ITable, and other interfaces.
You can use IName's open method to create a NetCDFFeatureClass from the NetCDFFeatureClassName object. You can then use the NetCDFFeatureClass for analysis or to create a feature layer. See the following illustration:
NetCDFTable
The NetCDFTable object extends Table. It implements IDataset, ITable, and other interfaces.
You can use the IName's open method to create a NetCDFTable from the NetCDFtableName object. You can then use the NetCDFTable for analysis or to create a table view. See the following illustration:
NetCDFRasterDataset
NetCDFRasterDataset extends RasterDataset. It implements IRasterDataset, IRasterBandCollection, and other interfaces.
You can use the IName's open method to create a NetCDFRasterDataset from the NetCDFRasterDatasetName object. You can then use the NetCDFRasterDataset for analysis or to create a raster layer. See the following illustration:
NetCDFRasterBand
The NetCDFRasterBand object extends RasterBand. It implements INetCDFRasterBand, IRasterBand, IRasterDataset, IRasterBandCollection, and other interfaces. See the following illustration: