Main Content

matlab.io.hdfeos.sw.regionInfo

Namespace: matlab.io.hdfeos.sw

Information about subsetted region

Syntax

[datatype,extent] = regionInfo(swathID,regionID,fieldname)

Description

[datatype,extent] = regionInfo(swathID,regionID,fieldname) returns the data type and extent of a subsetted region of a field. regionID is the identifier for the subsetted region.

This function corresponds to the SWregioninfo function in the HDF-EOS library C API, but because MATLAB® uses FORTRAN-style ordering, the extent parameter is reversed with respect to the C library API.

Examples

import matlab.io.hdfeos.*
swfid = sw.open('swath.hdf');
swathID = sw.attach(swfid,'Example Swath');
lat = [34 44];
lon = [16 24];
regionID = sw.defBoxRegion(swathID,lat,lon,'MIDPOINT');
[ntype,dims] = sw.regionInfo(swathID,regionID,'Temperature');
sw.detach(swathID);
sw.close(swfid);