public void testSimple_WMI_Lear() throws IOException {
String location = testFilePath + "/" + test_WMI_Lear_FileName;
assertTrue( "Test file <" + location + "> does not exist.",
new File( location ).exists() );
TrajectoryObsDataset me = null;
try
{
StringBuilder errlog = new StringBuilder();
me = (TrajectoryObsDataset) TypedDatasetFactory.open(FeatureType.TRAJECTORY, location, null, errlog);
}
catch ( IOException e )
{
String tmpMsg = "Couldn't create TrajectoryObsDataset from UW KingAir aircraft file <" + location + ">: " + e.getMessage();
assertTrue( tmpMsg,
false );
}
assertTrue( "Null TrajectoryObsDataset after open <" + location + "> ",
me != null );
assertTrue( "Dataset <" + location + "> not a SimpleTrajectoryObsDataset.",
me instanceof SimpleTrajectoryObsDataset );
// Check TypedDataset info.
long startDateLong = 1054157297000l;
long endDateLong = 1054159198000l;
float expStartLat = 38.5473f;
float expEndLat = 38.3979988098f;
float expStartLon = -89.8163f;
float expEndLon = -88.6897964f;
float expStartElev = 89.90000188f;
float expEndElev = 7998.0f;
Object exampleVarStartVal = new Float( 29.0f );
Object exampleVarEndVal = new Float( -28.2f );
TestTrajectoryObsDataset.TrajDatasetInfo trajDsInfo =
new TestTrajectoryObsDataset.TrajDatasetInfo( null, null, location,
startDateLong, endDateLong, null,
1, "history", "TrackFile.java,v 1.20 2003/05/07 04:53:23 maclean",
7, "tdry", "temperature", "deg_C", 0, new int[]{}, DataType.FLOAT.toString(), 5,
exampleVarStartVal, exampleVarEndVal,
1, "trajectory data", null, 588,
expStartLat, expEndLat,
expStartLon, expEndLon,
expStartElev, expEndElev );
TestTrajectoryObsDataset.testTrajInfo( me, trajDsInfo );
me.close();
}