Main Content

matlab.io.hdfeos.sw.extractRegion

Namespace: matlab.io.hdfeos.sw

Read subsetted region

Syntax

data = extractRegion(swathID,regionID,fieldname)

Description

data = extractRegion(swathID,regionID,fieldname) reads data for a specified field from a subsetted region identified by regionID.

This function corresponds to the SWextractregion function in the HDF-EOS library C 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');
data = sw.extractRegion(swathID,regionID,'Temperature');
sw.detach(swathID);
sw.close(swfid);