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 addCoord(Element tableElem, TableConfig table, Table.CoordName type, List<String> varNames) { String name = table.findCoordinateVariableName(type); if (name != null) { Element elem = new Element("coordinate").setAttribute("type", type.name()); elem.addContent(name); tableElem.addContent(elem); varNames.remove(name); } }
TableContiguous(NetcdfDataset ds, TableConfig config) { super(ds, config); this.ds = ds; startVarName = config.getStart(); numRecordsVarName = config.getNumRecords(); addNonDataVariable(startVarName); addNonDataVariable(numRecordsVarName); }
TableConfig timeTable = new TableConfig(Table.Type.MultidimStructure, obsDim.getShortName()); timeTable.missingVar = "_isMissing"; timeTable.structName = multidimStruct.getFullName(); timeTable.structureType = TableConfig.StructureType.Structure; timeTable.addJoin(new JoinArray(time, JoinArray.Type.level, 1)); timeTable.time = time.getFullName(); timeTable.feature_id = time.getFullName(); stnTable.addChild(timeTable); TableConfig obsTable = new TableConfig(Table.Type.NestedStructure, obsDim.getShortName()); Structure nestedStruct = Evaluator.findNestedStructure(multidimStruct); if (nestedStruct == null) { timeTable.addChild(obsTable);
TableConfig tc = new TableConfig(ttype, name); String coordNameType = coordElem.getAttributeValue("type"); Table.CoordName coordName = Table.CoordName.valueOf(coordNameType); tc.setCoordinateVariableName(coordName, coordElem.getText()); tc.addJoin( readJoinArray(ds, joinElem)); tc.addChild( parseTableConfig(ds, nestedTable, tc));
private TableConfig makeSingle(NetcdfDataset ds, Dimension obsDim, Formatter errlog) throws IOException { Table.Type obsTableType = Table.Type.Structure; TableConfig obsTable = new TableConfig(obsTableType, "single"); obsTable.dimName = obsDim.getShortName(); obsTable.lat = matchAxisTypeAndDimension(ds, AxisType.Lat, obsDim); obsTable.lon = matchAxisTypeAndDimension(ds, AxisType.Lon, obsDim); obsTable.elev = matchAxisTypeAndDimension(ds, AxisType.Height, obsDim); if (obsTable.elev == null) obsTable.elev = matchAxisTypeAndDimension(ds, AxisType.Pressure, obsDim); if (obsTable.elev == null) obsTable.elev = matchAxisTypeAndDimension(ds, AxisType.GeoZ, obsDim); obsTable.time = matchAxisTypeAndDimension(ds, AxisType.Time, obsDim); makeStructureInfo(obsTable, ds, null, obsDim); return obsTable; }
Variable v = iter.next(); if (v instanceof Structure) { // handles Sequences too TableConfig st = new TableConfig(Table.Type.Structure, v.getFullName()); CoordSysEvaluator.findCoords(st, ds, null); st.structName = v.getFullName(); TableConfig st = new TableConfig(Table.Type.Structure, obsDim.getShortName()); st.structureType = obsDim.isUnlimited() ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; st.structName = obsDim.isUnlimited() ? "record" : obsDim.getShortName(); st.addJoin(new JoinArray(time, JoinArray.Type.scalar, 0)); st.time = time.getShortName(); TableConfig st = new TableConfig(Table.Type.Structure, obsDim.getShortName()); st.structureType = TableConfig.StructureType.PsuedoStructure; st.dimName = obsDim.getShortName();
parentTable.addChild(obsConfig); return parentTable;
String getStart() { if (start != null) return start; if (parent != null) return parent.getStart(); return null; }
String getNumRecords() { if (numRecords != null) return numRecords; if (parent != null) return parent.getNumRecords(); return null; }
TableConfig timeTable = new TableConfig(Table.Type.MultidimStructure, obsDim.getShortName()); timeTable.missingVar = "_isMissing"; timeTable.structName = multidimStruct.getFullName(); timeTable.structureType = TableConfig.StructureType.Structure; timeTable.addJoin(new JoinArray(time, JoinArray.Type.level, 1)); timeTable.time = time.getFullName(); timeTable.feature_id = time.getFullName(); stnTable.addChild(timeTable); TableConfig obsTable = new TableConfig(Table.Type.NestedStructure, obsDim.getShortName()); Structure nestedStruct = Evaluator.findNestedStructure(multidimStruct); if (nestedStruct == null) { timeTable.addChild(obsTable);
TableConfig tc = new TableConfig(ttype, name); String coordNameType = coordElem.getAttributeValue("type"); Table.CoordName coordName = Table.CoordName.valueOf(coordNameType); tc.setCoordinateVariableName(coordName, coordElem.getText()); tc.addJoin( readJoinArray(ds, joinElem)); tc.addChild( parseTableConfig(ds, nestedTable, tc));
private TableConfig makeSingle(NetcdfDataset ds, Dimension obsDim, Formatter errlog) throws IOException { Table.Type obsTableType = Table.Type.Structure; TableConfig obsTable = new TableConfig(obsTableType, "single"); obsTable.dimName = obsDim.getShortName(); obsTable.lat = matchAxisTypeAndDimension(ds, AxisType.Lat, obsDim); obsTable.lon = matchAxisTypeAndDimension(ds, AxisType.Lon, obsDim); obsTable.elev = matchAxisTypeAndDimension(ds, AxisType.Height, obsDim); if (obsTable.elev == null) obsTable.elev = matchAxisTypeAndDimension(ds, AxisType.Pressure, obsDim); if (obsTable.elev == null) obsTable.elev = matchAxisTypeAndDimension(ds, AxisType.GeoZ, obsDim); obsTable.time = matchAxisTypeAndDimension(ds, AxisType.Time, obsDim); makeStructureInfo(obsTable, ds, null, obsDim); return obsTable; }
Variable v = iter.next(); if (v instanceof Structure) { // handles Sequences too TableConfig st = new TableConfig(Table.Type.Structure, v.getFullName()); CoordSysEvaluator.findCoords(st, ds); st.structName = v.getFullName(); TableConfig st = new TableConfig(Table.Type.Structure, obsDim.getShortName()); st.structureType = obsDim.isUnlimited() ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; st.structName = obsDim.isUnlimited() ? "record" : obsDim.getShortName(); st.addJoin(new JoinArray(time, JoinArray.Type.scalar, 0)); st.time = time.getShortName(); TableConfig st = new TableConfig(Table.Type.Structure, obsDim.getShortName()); st.structureType = TableConfig.StructureType.PsuedoStructure; st.dimName = obsDim.getShortName();
trajTable.addChild(obsConfig); return trajTable;
String getStart() { if (start != null) return start; if (parent != null) return parent.getStart(); return null; }
String getNumRecords() { if (numRecords != null) return numRecords; if (parent != null) return parent.getNumRecords(); return null; }
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; }