public GridCoordSys getGridCoordSys(VariableEnhanced ve) { List<CoordinateSystem> csList = ve.getCoordinateSystems(); for (CoordinateSystem cs : csList) { if (GridCoordSys.isGridCoordSys(null, cs, ve)) { return new GridCoordSys(cs, null); } } return null; }
public GridCoordSys getGridCoordSys(VariableEnhanced ve) { List<CoordinateSystem> csList = ve.getCoordinateSystems(); for (CoordinateSystem cs : csList) { if (GridCoordSys.isGridCoordSys(null, cs, ve)) { return new GridCoordSys(cs, null); } } return null; }
public GridCoordSys getGridCoordSys(VariableEnhanced ve) { List<CoordinateSystem> csList = ve.getCoordinateSystems(); for (CoordinateSystem cs : csList) { if (GridCoordSys.isGridCoordSys(null, cs, ve)) { return new GridCoordSys(cs, null); } } return null; }
/** * Determine if the CoordinateSystem cs can be made into a GridCoordSys for the Variable v. * * @param sbuff put debug information into this StringBuffer; may be null. * @param cs CoordinateSystem to check. * @param v Variable to check. * @return the GridCoordSys made from cs, else null. */ public static GridCoordSys makeGridCoordSys(Formatter sbuff, CoordinateSystem cs, VariableEnhanced v) { if (sbuff != null) { sbuff.format(" "); v.getNameAndDimensions(sbuff, false, true); sbuff.format(" check CS %s: ", cs.getName()); } if (isGridCoordSys(sbuff, cs, v)) { GridCoordSys gcs = new GridCoordSys(cs, sbuff); if (sbuff != null) sbuff.format(" OK%n"); return gcs; } return null; }
/** * Determine if the CoordinateSystem cs can be made into a GridCoordSys for the Variable v. * * @param sbuff put debug information into this StringBuffer; may be null. * @param cs CoordinateSystem to check. * @param v Variable to check. * @return the GridCoordSys made from cs, else null. */ public static GridCoordSys makeGridCoordSys(Formatter sbuff, CoordinateSystem cs, VariableEnhanced v) { if (sbuff != null) { sbuff.format(" "); v.getNameAndDimensions(sbuff, false, true); sbuff.format(" check CS %s: ", cs.getName()); } if (isGridCoordSys(sbuff, cs, v)) { GridCoordSys gcs = new GridCoordSys(cs, sbuff); if (sbuff != null) sbuff.format(" OK\n"); return gcs; } return null; }
/** * Determine if the CoordinateSystem cs can be made into a GridCoordSys for the Variable v. * * @param sbuff put debug information into this StringBuffer; may be null. * @param cs CoordinateSystem to check. * @param v Variable to check. * @return the GridCoordSys made from cs, else null. */ public static GridCoordSys makeGridCoordSys(Formatter sbuff, CoordinateSystem cs, VariableEnhanced v) { if (sbuff != null) { sbuff.format(" "); v.getNameAndDimensions(sbuff, false, true); sbuff.format(" check CS %s: ", cs.getName()); } if (isGridCoordSys(sbuff, cs, v)) { GridCoordSys gcs = new GridCoordSys(cs, sbuff); if (sbuff != null) sbuff.format(" OK%n"); return gcs; } return null; }
public GridDatatype makeSubset(Range rt_range, Range e_range, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException { // get the ranges list int rank = getRank(); Range[] ranges = new Range[rank]; if (null != getXDimension()) ranges[xDimOrgIndex] = x_range; if (null != getYDimension()) ranges[yDimOrgIndex] = y_range; if (null != getZDimension()) ranges[zDimOrgIndex] = z_range; if (null != getTimeDimension()) ranges[tDimOrgIndex] = t_range; if (null != getRunTimeDimension()) ranges[rtDimOrgIndex] = rt_range; if (null != getEnsembleDimension()) ranges[eDimOrgIndex] = e_range; List<Range> rangesList = Arrays.asList(ranges); // subset the variable VariableDS v_section = (VariableDS) vs.section( new Section(rangesList)); List<Dimension> dims = v_section.getDimensions(); for (Dimension dim : dims) { dim.setShared(true); // make them shared (section will make them unshared) } // subset the axes in the GridCoordSys GridCoordSys gcs_section = new GridCoordSys(gcs, rt_range, e_range, t_range, z_range, y_range, x_range); // now we can make the geogrid return new GeoGrid(dataset, v_section, gcs_section); }
public GridDatatype makeSubset(Range rt_range, Range e_range, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException { // get the ranges list int rank = getRank(); Range[] ranges = new Range[rank]; if (null != getXDimension()) ranges[xDimOrgIndex] = x_range; if (null != getYDimension()) ranges[yDimOrgIndex] = y_range; if (null != getZDimension()) ranges[zDimOrgIndex] = z_range; if (null != getTimeDimension()) ranges[tDimOrgIndex] = t_range; if (null != getRunTimeDimension()) ranges[rtDimOrgIndex] = rt_range; if (null != getEnsembleDimension()) ranges[eDimOrgIndex] = e_range; List<Range> rangesList = Arrays.asList(ranges); // subset the variable VariableDS v_section = (VariableDS) vs.section( new Section(rangesList)); List<Dimension> dims = v_section.getDimensions(); for (Dimension dim : dims) { dim.setShared(true); // make them shared (section will make them unshared) } // subset the axes in the GridCoordSys GridCoordSys gcs_section = new GridCoordSys(gcs, rt_range, e_range, t_range, z_range, y_range, x_range); // now we can make the geogrid return new GeoGrid(dataset, v_section, gcs_section); }
public GridDatatype makeSubset(Range rt_range, Range e_range, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException { // get the ranges list int rank = getRank(); Range[] ranges = new Range[rank]; if (null != getXDimension()) ranges[xDimOrgIndex] = x_range; if (null != getYDimension()) ranges[yDimOrgIndex] = y_range; if (null != getZDimension()) ranges[zDimOrgIndex] = z_range; if (null != getTimeDimension()) ranges[tDimOrgIndex] = t_range; if (null != getRunTimeDimension()) ranges[rtDimOrgIndex] = rt_range; if (null != getEnsembleDimension()) ranges[eDimOrgIndex] = e_range; List<Range> rangesList = Arrays.asList(ranges); // subset the variable VariableDS v_section = (VariableDS) vs.section( new Section(rangesList)); List<Dimension> dims = v_section.getDimensions(); for (Dimension dim : dims) { dim.setShared(true); // make them shared (section will make them unshared) } // subset the axes in the GridCoordSys GridCoordSys gcs_section = new GridCoordSys(gcs, rt_range, e_range, t_range, z_range, y_range, x_range); // now we can make the geogrid return new GeoGrid(dataset, v_section, gcs_section); }
Element csElem; if (GridCoordSys.isGridCoordSys(null, cs, null)) { GridCoordSys gcs = new GridCoordSys(cs, null); csElem = new Element("gridCoordSystem"); csElem.setAttribute("name", cs.getName());
Element csElem; if (GridCoordSys.isGridCoordSys(null, cs, null)) { GridCoordSys gcs = new GridCoordSys(cs, null); csElem = new Element("gridCoordSystem"); csElem.setAttribute("name", cs.getName());
Element csElem; if (GridCoordSys.isGridCoordSys(null, cs, null)) { GridCoordSys gcs = new GridCoordSys(cs, null); csElem = new Element("gridCoordSystem"); csElem.setAttribute("name", cs.getName());