Main Content
matlab.io.hdfeos.gd.readTile
Namespace: matlab.io.hdfeos.gd
Read single tile of data from field
Syntax
data = readTile(gridID,fieldname,tileCoords)
Description
data = readTile(gridID,fieldname,tileCoords)
reads
a single of data from a field. If the data is to be read tile by
tile, this routine is more efficient than gd.readField
.
In all other cases, use gd.readField
. The tileCoords
argument
has the form [rownum colnum]
and is defined in
terms of the tile coordinates, not the data elements.
This function corresponds to the GDreadtile
function
in the HDF-EOS library C API, but because MATLAB® uses FORTRAN-style
ordering, the tileCoords
parameter is reversed
with respect to the C library API.
Examples
Define a field with a 2-by-3 tiling scheme.
import matlab.io.hdfeos.* gfid = gd.open('grid.hdf','read'); gridID = gd.attach(gfid,'PolarGrid'); for h = 0:9 data = gd.readTile(gridID,'pressure',[0 0 h]); end gd.detach(gridID); gd.close(gfid);