Routines (alphabetical) > Routines: H > HDF-EOS Routines > EOS_GD_DEFBOXREGION

# EOS_GD_DEFBOXREGION

This function defines a longitude-latitude box region for a grid. It returns a grid region ID which is used by the EOS_GD_EXTRACTREGION function to read all the entries of a data field within the region.

## Examples

In this example, we define the region to be the first quadrant of the Northern hemisphere:

cornerlon[0] = 0.d

cornerlat[0] = 90.d

cornerlon[1] = 90.d

cornerlat[1] = 0.d

regionID = EOS_GD_DEFBOXREGION(EOS_GD_id, cornerlon, cornerlat)

## Syntax

Result = EOS_GD_DEFBOXREGION(gridID, cornerlon, cornerlat)

## Return Value

Returns the grid region ID if successful and FAIL (–1) otherwise.

## Arguments

### gridID

Grid id (long) returned by EOS_GD_CREATE or EOS_GD_ATTACH.

### cornerlon

Longitude (double, 2 element array) in decimal degrees of box corners.

### cornerlat

Latitude (double, 2 element array) in decimal degrees of box corners.

## Keywords

None

## Version History

5.2 | Introduced