Download HDF-EOS Library User's Guide for the ECS Project, Volume 1

Transcript
}
// Get the bounding coordinates for the grid in gctp terms
for (EcTInt j=0; j<InCPpNumberOfDefinedGrids; j++)
{
if (myNonSearchableMetadata.nonSearchableSDSData[i].gridId ==
InCPpGridCoordinates[j].gridId)
{
ulCorner[0] = InCPpGridCoordinates[j].upperLeftLon;
ulCorner[1] = InCPpGridCoordinates[j].upperLeftLat;
lrCorner[0] = InCPpGridCoordinates[j].lowerRightLon;
lrCorner[1] = InCPpGridCoordinates[j].lowerRightLat;
}
}
// Fill in the required GCTP parameters
projParameters[0] = radiusOfEarth;
projParameters[1] = 0;
projParameters[6] = 0;
projParameters[7] = 0;
projParameters[8] = 0;
projParameters[9] = 0;
projParameters[10] = 0;
projParameters[11] = 0;
projParameters[12] = 0;
for (j=0; j<InCPpNumberOfDefinedGrids; j++)
{
if ( InCPpGCTPparms[j].gridId ==
myNonSearchableMetadata.nonSearchableSDSData[i].gridId)
{
projParameters[2] = InCPpGCTPparms[j].stdpar1;
projParameters[3] = InCPpGCTPparms[j].stdpar2;
projParameters[4] = InCPpGCTPparms[j].centLon;
projParameters[5] = InCPpGCTPparms[j].originLat;
break;
}
}
// Fill in the boundary values for the grid
hdfBoundary[0] = myNonSearchableMetadata.nonSearchableSDSData[i].
northmostLat;
hdfBoundary[1] = myNonSearchableMetadata.nonSearchableSDSData[i].
eastmostLon;
hdfBoundary[2] = myNonSearchableMetadata.nonSearchableSDSData[i].
southmostLat;
hdfBoundary[3] = myNonSearchableMetadata.nonSearchableSDSData[i].
westmostLon;
// Create the required grid
Grid, Real World C++ Example
7-43
170-TP-500-001