private void checkIfTrajectory(TableConfig st) { // deal with possible trajectory - only do this if dataset has metadata FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds); if (ft == FeatureType.TRAJECTORY) { st.featureType = FeatureType.TRAJECTORY; TableConfig pc = new TableConfig(Table.Type.Top, "single"); st.parent = pc; pc.addChild(st); } else st.featureType = FeatureType.POINT; }
private void checkIfTrajectory(TableConfig st) { // deal with possible trajectory - only do this if dataset has metadata FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds); if (ft == FeatureType.TRAJECTORY) { st.featureType = FeatureType.TRAJECTORY; TableConfig pc = new TableConfig(Table.Type.Top, "single"); st.parent = pc; pc.addChild(st); } else st.featureType = FeatureType.POINT; }
private void checkIfTrajectory(TableConfig st) { // deal with possible trajectory - only do this if dataset has metadata FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds); if (ft == FeatureType.TRAJECTORY) { st.featureType = FeatureType.TRAJECTORY; TableConfig pc = new TableConfig(Table.Type.Top, "single"); st.parent = pc; pc.addChild(st); } else st.featureType = FeatureType.POINT; }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) { VNames vn = getVariableNames(ds, errlog); TableConfig trajTable = new TableConfig(Table.Type.Construct, "trajectory"); trajTable.featureType = FeatureType.TRAJECTORY; trajTable.feature_id = TRAJ_ID; TableConfig obs = new TableConfig(Table.Type.ParentId, "record"); obs.parentIndex = TRAJ_ID; obs.dimName = Evaluator.getDimensionName(ds, "recNum", errlog); obs.time = vn.obsTime; obs.timeNominal = vn.nominalTime; //obs.stnId = vn.stnId; //obs.stnDesc = vn.stnDesc; obs.lat = vn.lat; obs.lon = vn.lon; obs.elev = vn.elev; trajTable.addChild(obs); return trajTable; }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) { VNames vn = getVariableNames(ds, errlog); TableConfig trajTable = new TableConfig(Table.Type.Construct, "trajectory"); trajTable.featureType = FeatureType.TRAJECTORY; trajTable.feature_id = TRAJ_ID; TableConfig obs = new TableConfig(Table.Type.ParentId, "record"); obs.parentIndex = TRAJ_ID; obs.dimName = Evaluator.getDimensionName(ds, "recNum", errlog); obs.time = vn.obsTime; obs.timeNominal = vn.nominalTime; //obs.stnId = vn.stnId; //obs.stnDesc = vn.stnDesc; obs.lat = vn.lat; obs.lon = vn.lon; obs.elev = vn.elev; trajTable.addChild(obs); return trajTable; }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) { VNames vn = getVariableNames(ds, errlog); TableConfig trajTable = new TableConfig(Table.Type.Construct, "trajectory"); trajTable.featureType = FeatureType.TRAJECTORY; trajTable.feature_id = TRAJ_ID; TableConfig obs = new TableConfig(Table.Type.ParentId, "record"); obs.parentIndex = TRAJ_ID; obs.dimName = Evaluator.getDimensionName(ds, "recNum", errlog); obs.time = vn.obsTime; obs.timeNominal = vn.nominalTime; //obs.stnId = vn.stnId; //obs.stnDesc = vn.stnDesc; obs.lat = vn.lat; obs.lon = vn.lon; obs.elev = vn.elev; trajTable.addChild(obs); return trajTable; }
protected TableConfig getStationProfileConfig(NetcdfDataset ds, Formatter errlog) throws IOException { TableConfig stnTable = getStationConfig(ds, errlog); if (stnTable == null) return null; stnTable.featureType = FeatureType.STATION_PROFILE; TableConfig timeSeries = stnTable.children.get(0); Structure obsv = (Structure) ds.findVariable(timeSeries.name); Structure profile = null; for (Variable v : obsv.getVariables()) { if (v.getDataType() == DataType.SEQUENCE) profile = (Structure) v; } TableConfig profileTc = new TableConfig(Table.Type.NestedStructure, profile.getFullName()); profileTc.nestedTableName = profile.getShortName(); Variable elev = findZAxisNotStationAlt(ds); profileTc.elev = elev.getShortName(); if (profileTc.elev == null) { errlog.format("Must have a level coordinate%n"); return null; } timeSeries.addChild(profileTc); return stnTable; }
protected TableConfig getStationProfileConfig(NetcdfDataset ds, Formatter errlog) throws IOException { TableConfig stnTable = getStationConfig(ds, errlog); if (stnTable == null) return null; stnTable.featureType = FeatureType.STATION_PROFILE; TableConfig timeSeries = stnTable.children.get(0); Structure obsv = (Structure) ds.findVariable(timeSeries.name); Structure profile = null; for (Variable v : obsv.getVariables()) { if (v.getDataType() == DataType.SEQUENCE) profile = (Structure) v; } TableConfig profileTc = new TableConfig(Table.Type.NestedStructure, profile.getFullName()); profileTc.nestedTableName = profile.getShortName(); Variable elev = findZAxisNotStationAlt(ds); profileTc.elev = elev.getShortName(); if (profileTc.elev == null) { errlog.format("Must have a level coordinate%n"); return null; } timeSeries.addChild(profileTc); return stnTable; }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException { TableConfig nt = new TableConfig(Table.Type.ArrayStructure, "station"); nt.featureType = FeatureType.STATION_PROFILE; nt.structName = "station"; nt.stnId = STN_NAME; nt.lat = STN_LAT; nt.lon = STN_LON; nt.elev = STN_ELEV; // make the station array structure in memory // nt.as = makeIndex(ds); TableConfig obs = new TableConfig(Table.Type.Structure, "obsRecord"); obs.structName = "record"; obs.dimName = Evaluator.getDimensionName(ds, "record", errlog); obs.lat = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Lat); obs.lon = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Lon); obs.elev = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Height); obs.time = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Time); obs.stnId = Evaluator.getVariableName(ds, "name", errlog); //obs.join = new TableConfig.JoinConfig(Join.Type.Index); // create an IndexJoin and attach to the obs.join //indexJoin = new IndexJoin(obs.join); nt.addChild(obs); TableConfig levels = new TableConfig(Table.Type.Structure, "seq1"); levels.structName = "seq1"; levels.elev = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Height); //levels.join = new TableConfig.JoinConfig(Join.Type.NestedStructure); obs.addChild(levels); return nt; }
private void findNestedStructures(Structure s, TableConfig parent) { for (Variable v : s.getVariables()) { if (v instanceof Structure) { // handles Sequences too TableConfig nestedTable = new TableConfig(Table.Type.NestedStructure, v.getFullName()); nestedTable.structName = v.getFullName(); nestedTable.nestedTableName = v.getShortName(); addTable(nestedTable); parent.addChild(nestedTable); // LOOK why not add the join(parent,child) here ? //nestedTable.join = new TableConfig.JoinConfig(Join.Type.NestedStructure); //joins.add(nestedTable.join); findNestedStructures((Structure) v, nestedTable); // look for nested structures } } }
private void findNestedStructures(Structure s, TableConfig parent) { for (Variable v : s.getVariables()) { if (v instanceof Structure) { // handles Sequences too TableConfig nestedTable = new TableConfig(Table.Type.NestedStructure, v.getFullName()); nestedTable.structName = v.getFullName(); nestedTable.nestedTableName = v.getShortName(); addTable(nestedTable); parent.addChild(nestedTable); // LOOK why not add the join(parent,child) here ? //nestedTable.join = new TableConfig.JoinConfig(Join.Type.NestedStructure); //joins.add(nestedTable.join); findNestedStructures((Structure) v, nestedTable); // look for nested structures } } }
private void findNestedStructures(Structure s, TableConfig parent) { for (Variable v : s.getVariables()) { if (v instanceof Structure) { // handles Sequences too TableConfig nestedTable = new TableConfig(Table.Type.NestedStructure, v.getFullName()); nestedTable.structName = v.getFullName(); nestedTable.nestedTableName = v.getShortName(); addTable(nestedTable); parent.addChild(nestedTable); // LOOK why not add the join(parent,child) here ? //nestedTable.join = new TableConfig.JoinConfig(Join.Type.NestedStructure); //joins.add(nestedTable.join); findNestedStructures((Structure) v, nestedTable); // search for nested structures } } }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException { TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory"); CoordinateAxis coordAxis = CoordSysEvaluator.findCoordByType(ds, AxisType.Time); if (coordAxis == null) { errlog.format("Cant find a time coordinate"); return null; } Dimension innerDim = coordAxis.getDimension(0); boolean obsIsStruct = Evaluator.hasRecordStructure(ds) && innerDim.isUnlimited(); TableConfig obsTable = new TableConfig(Table.Type.Structure, innerDim.getShortName()); obsTable.dimName = innerDim.getShortName(); obsTable.time = coordAxis.getFullName(); obsTable.structName = obsIsStruct ? "record" : innerDim.getShortName(); obsTable.structureType = obsIsStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; CoordSysEvaluator.findCoordWithDimension(obsTable, ds, innerDim); topTable.addChild(obsTable); return topTable; } }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException { TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory"); CoordinateAxis coordAxis = CoordSysEvaluator.findCoordByType(ds, AxisType.Time); if (coordAxis == null) { errlog.format("Cant find a time coordinate"); return null; } final Dimension innerDim = coordAxis.getDimension(0); boolean obsIsStruct = Evaluator.hasNetcdf3RecordStructure(ds) && innerDim.isUnlimited(); TableConfig obsTable = new TableConfig(Table.Type.Structure, innerDim.getShortName()); obsTable.dimName = innerDim.getShortName(); obsTable.time = coordAxis.getFullName(); obsTable.structName = obsIsStruct ? "record" : innerDim.getShortName(); obsTable.structureType = obsIsStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; CoordSysEvaluator.findCoords(obsTable, ds, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return innerDim.equals(axis.getDimension(0)); } }); topTable.addChild(obsTable); return topTable; } }
public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException { TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory"); CoordinateAxis coordAxis = CoordSysEvaluator.findCoordByType(ds, AxisType.Time); if (coordAxis == null) { errlog.format("Cant find a time coordinate"); return null; } final Dimension innerDim = coordAxis.getDimension(0); boolean obsIsStruct = Evaluator.hasNetcdf3RecordStructure(ds) && innerDim.isUnlimited(); TableConfig obsTable = new TableConfig(Table.Type.Structure, innerDim.getShortName()); obsTable.dimName = innerDim.getShortName(); obsTable.time = coordAxis.getFullName(); obsTable.structName = obsIsStruct ? "record" : innerDim.getShortName(); obsTable.structureType = obsIsStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; CoordSysEvaluator.findCoords(obsTable, ds, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return innerDim.equals(axis.getDimension(0)); } }); topTable.addChild(obsTable); return topTable; } }
protected TableConfig getTrajectoryConfig(NetcdfDataset ds, Formatter errlog) { TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory"); // the profile values are the inner sequence TableConfig obsTable = new TableConfig(Table.Type.Structure, BufrIosp.obsRecord); Structure obsStruct = (Structure) ds.findVariable(BufrIosp.obsRecord); obsTable.structName = obsStruct.getName(); obsTable.nestedTableName = obsStruct.getShortName(); obsTable.lat = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Lat.toString()); obsTable.lon = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Lon.toString()); obsTable.elev = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Height.toString()); obsTable.time = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Time.toString()); topTable.addChild(obsTable); return topTable; }
protected TableConfig getStationProfileConfig(NetcdfDataset ds, Formatter errlog) { // construct the station table by reading through the timeseries TableConfig stnTable = new TableConfig(Table.Type.Construct, "station"); stnTable.featureType = FeatureType.STATION_PROFILE; stnTable.structName = BufrIosp.obsRecord; // the time series is just the outer structure TableConfig timeTable = new TableConfig(Table.Type.ParentId, BufrIosp.obsRecord); Structure stnStruct = (Structure) ds.findVariable(BufrIosp.obsRecord); timeTable.lat = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lat.toString()); timeTable.lon = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lon.toString()); timeTable.stnAlt = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Height.toString()); timeTable.stnId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_ID); timeTable.stnWmoId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_WMOID); if (timeTable.stnId == null) timeTable.stnId = timeTable.stnWmoId; timeTable.parentIndex = timeTable.stnId; timeTable.time = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Time.toString()); timeTable.structName = BufrIosp.obsRecord; stnTable.addChild(timeTable); // the profile values are the inner sequence TableConfig obsTable = new TableConfig(Table.Type.NestedStructure, "levels"); Structure obsStruct = (Structure) stnStruct.findVariable("seq1"); // kludgerino if (obsStruct == null) obsStruct = (Structure) stnStruct.findVariable("struct1"); obsTable.structName = obsStruct.getName(); obsTable.nestedTableName = obsStruct.getShortName(); obsTable.elev = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Height.toString()); timeTable.addChild(obsTable); return stnTable; }
obs.dimName = obsDim.getShortName(); obs.time = CoordSysEvaluator.findCoordNameByType(ds, AxisType.Time); nt.addChild(obs);
protected TableConfig getStationConfig(NetcdfDataset ds, Formatter errlog) { // construct the station table by reading through the timeseries TableConfig stnTable = new TableConfig(Table.Type.Construct, "station"); stnTable.featureType = FeatureType.STATION; stnTable.structName = BufrIosp.obsRecord; // the time series is just the outer structure TableConfig timeTable = new TableConfig(Table.Type.ParentId, BufrIosp.obsRecord); Structure stnStruct = (Structure) ds.findVariable(BufrIosp.obsRecord); timeTable.lat = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lat.toString()); timeTable.lon = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lon.toString()); timeTable.stnAlt = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Height.toString()); timeTable.stnId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_ID); timeTable.stnWmoId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_WMOID); if (timeTable.stnId == null) timeTable.stnId = timeTable.stnWmoId; timeTable.parentIndex = timeTable.stnId; timeTable.time = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Time.toString()); timeTable.structName = BufrIosp.obsRecord; stnTable.addChild(timeTable); return stnTable; }
protected TableConfig getProfileConfig(NetcdfDataset ds, Formatter errlog) { // construct the station table by reading through the timeseries TableConfig profileTable = new TableConfig(Table.Type.Structure, "profile"); profileTable.featureType = FeatureType.PROFILE; profileTable.structName = BufrIosp.obsRecord; Structure profileStruct = (Structure) ds.findVariable(BufrIosp.obsRecord); profileTable.lat = Evaluator.getNameOfVariableWithAttribute(profileStruct, _Coordinate.AxisType, AxisType.Lat.toString()); profileTable.lon = Evaluator.getNameOfVariableWithAttribute(profileStruct, _Coordinate.AxisType, AxisType.Lon.toString()); profileTable.time = Evaluator.getNameOfVariableWithAttribute(profileStruct, _Coordinate.AxisType, AxisType.Time.toString()); // the time series is just the outer structure TableConfig obsTable = new TableConfig(Table.Type.NestedStructure, "struct5"); Structure obsStruct = (Structure) profileStruct.findVariable("struct5"); obsTable.structName = obsStruct.getName(); obsTable.nestedTableName = obsStruct.getShortName(); obsTable.elev = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Pressure.toString()); // HEY not height profileTable.addChild(obsTable); return profileTable; }