Main Content

matlab.io.hdfeos.gd.regionInfo

Namespace: matlab.io.hdfeos.gd

Information about subsetted region

Syntax

[dims,upLeft,lowRight] = regionInfo(gridID,regionID,fieldname)

Description

[dims,upLeft,lowRight] = regionInfo(gridID,regionID,fieldname) returns the dimensions and corner points for the specified field of a subsetted region identified by regionID in the grid identified by gridID.

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

Examples

import matlab.io.hdfeos.*
gfid = gd.open('grid.hdf','read');
gridID = gd.attach(gfid,'PolarGrid');
cornerlat = [20 50];
cornerlon = [-90 -60];
regionID = gd.defBoxRegion(gridID,cornerlat,cornerlon);
[dims,upleft,lowright] = gd.regionInfo(gridID,regionID,'ice_temp');
data = gd.extractRegion(gridID,regionID,'ice_temp');
gd.detach(gridID);
gd.close(gfid);