Main Content

matlab.io.hdfeos.gd.attach

Namespace: matlab.io.hdfeos.gd

Attach to existing grid

Syntax

gridID = attach(gfID,gridName)

Description

gridID = attach(gfID,gridName) attaches to the grid dataset identified by gridName in the file identified by gfID. The gridID output is the identifier for the grid dataset.

This function corresponds to the GDattach function in the HDF-EOS library C API.

Examples

Attach to the grid named 'PolarGrid' in the file 'grid.hdf'.

import matlab.io.hdfeos.*
gfID = gd.open('grid.hdf');
gridID = gd.attach(gfID,'PolarGrid');
gd.detach(gridID);
gd.close(gfID);