private void constructCoordinateSystems(NetcdfDataset ds, VariableEnhanced v, Formatter parseInfo) { if (v instanceof StructureDS) { StructureDS s = (StructureDS) v; List<Variable> members = s.getVariables(); for (Variable nested : members) { // LOOK flatten here ?? constructCoordinateSystems(ds, (VariableEnhanced) nested, parseInfo); } } else { // see if it has a GridCS // LOOK: should add geogrid it multiple times if there are multiple geoCS ?? GridCoordSys gcs = null; List<CoordinateSystem> csys = v.getCoordinateSystems(); for (CoordinateSystem cs : csys) { GridCoordSys gcsTry = GridCoordSys.makeGridCoordSys(parseInfo, cs, v); if (gcsTry != null) { gcs = gcsTry; if (gcsTry.isProductSet()) break; } } if (gcs != null) addGeoGrid((VariableDS) v, gcs, parseInfo); } }
private void constructCoordinateSystems(NetcdfDataset ds, VariableEnhanced v, Formatter parseInfo) { if (v instanceof StructureDS) { StructureDS s = (StructureDS) v; List<Variable> members = s.getVariables(); for (Variable nested : members) { // LOOK flatten here ?? constructCoordinateSystems(ds, (VariableEnhanced) nested, parseInfo); } } else { // see if it has a GridCS // LOOK: should add geogrid it multiple times if there are multiple geoCS ?? GridCoordSys gcs = null; List<CoordinateSystem> csys = v.getCoordinateSystems(); for (CoordinateSystem cs : csys) { GridCoordSys gcsTry = GridCoordSys.makeGridCoordSys(parseInfo, cs, v); if (gcsTry != null) { gcs = gcsTry; if (gcsTry.isProductSet()) break; } } if (gcs != null) addGeoGrid((VariableDS) v, gcs, parseInfo); } }
private void constructCoordinateSystems(NetcdfDataset ds, VariableEnhanced v, Formatter parseInfo) { if (v instanceof StructureDS) { StructureDS s = (StructureDS) v; List<Variable> members = s.getVariables(); for (Variable nested : members) { // LOOK flatten here ?? constructCoordinateSystems(ds, (VariableEnhanced) nested, parseInfo); } } else { // see if it has a GridCS // LOOK: should add geogrid it multiple times if there are multiple geoCS ?? GridCoordSys gcs = null; List<CoordinateSystem> csys = v.getCoordinateSystems(); for (CoordinateSystem cs : csys) { GridCoordSys gcsTry = GridCoordSys.makeGridCoordSys(parseInfo, cs, v); if (gcsTry != null) { gcs = gcsTry; if (gcsTry.isProductSet()) break; } } if (gcs != null) addGeoGrid((VariableDS) v, gcs, parseInfo); } }