/** * Look for Axis by Type, assign to TableConfig if found. * Looks for Lat, Lon, Time, Height. * @param nt assign coordinates to this table. * @param ds look in this dataset's "Best" coordinate system. If no CoordSystem, try list of coordinate axes */ static public void findCoords(TableConfig nt, NetcdfDataset ds) { CoordinateSystem use = findBestCoordinateSystem(ds); if (use == null) findCoords(nt, ds.getCoordinateAxes()); else findCoords(nt, use.getCoordinateAxes()); }
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(); st.nestedTableName = v.getShortName(); st.structName = obsDim.isUnlimited() ? "record" : obsDim.getShortName(); st.dimName = obsDim.getShortName(); CoordSysEvaluator.findCoords(st, ds, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return obsDim.equals(axis.getDimension(0)); st.structureType = TableConfig.StructureType.PsuedoStructure; st.dimName = obsDim.getShortName(); CoordSysEvaluator.findCoords(st, ds, null);
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(); st.nestedTableName = v.getShortName(); st.structName = obsDim.isUnlimited() ? "record" : obsDim.getShortName(); st.dimName = obsDim.getShortName(); CoordSysEvaluator.findCoords(st, ds, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return obsDim.equals(axis.getDimension(0)); st.structureType = TableConfig.StructureType.PsuedoStructure; st.dimName = obsDim.getShortName(); CoordSysEvaluator.findCoords(st, ds, null);
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; } }
if (v instanceof Structure) { // handles Sequences too TableConfig st = new TableConfig(Table.Type.Structure, v.getFullName()); CoordSysEvaluator.findCoords(st, ds); st.structName = v.getFullName(); st.nestedTableName = v.getShortName(); st.structureType = TableConfig.StructureType.PsuedoStructure; st.dimName = obsDim.getShortName(); CoordSysEvaluator.findCoords(st, ds);
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; } }
nt.structureType = hasStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; nt.featureType = FeatureType.POINT; CoordSysEvaluator.findCoords(nt, ds, null); return nt;
nt.structureType = hasStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; nt.featureType = FeatureType.POINT; CoordSysEvaluator.findCoords(nt, ds); return nt;
nt.structureType = hasStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure; nt.featureType = FeatureType.POINT; CoordSysEvaluator.findCoords(nt, ds, null); return nt;