Codota Logo
VariableDS.getOriginalDataType
Code IndexAdd Codota to your IDE (free)

How to use
getOriginalDataType
method
in
ucar.nc2.dataset.VariableDS

Best Java code snippets using ucar.nc2.dataset.VariableDS.getOriginalDataType (Showing top 20 results out of 315)

  • Common ways to obtain VariableDS
private void myMethod () {
VariableDS v =
  • Codota IconNetcdfDataset netcdfDataset;String str;(VariableDS) netcdfDataset.findVariable(str)
  • Codota IconGridDatatype gridDatatype;gridDatatype.getVariable()
  • Codota IconNetcdfDataset ds;AxisType atype;CoordSysEvaluator.findCoordByType(ds, atype)
  • Smart code suggestions by Codota
}
origin: geotools/geotools

/**
 * Returns the data type which most closely represents the "raw" internal data of the variable.
 * This is the value returned by the default implementation of {@link
 * NetcdfImageReader#getRawDataType}.
 *
 * @param variable The variable.
 * @return The data type, or {@link DataBuffer#TYPE_UNDEFINED} if unknown.
 * @see NetcdfImageReader#getRawDataType
 */
public static int getRawDataType(final VariableIF variable) {
  VariableDS ds = (VariableDS) variable;
  final DataType type;
  if (Boolean.getBoolean(ENHANCE_SCALE_MISSING)) {
    type = ds.getDataType();
  } else {
    type = ds.getOriginalDataType();
  }
  return transcodeNetCDFDataType(type, variable.isUnsigned());
}
origin: org.geotools/gt-unidata

/**
 * Returns the data type which most closely represents the "raw" internal
 * data of the variable. This is the value returned by the default
 * implementation of {@link NetcdfImageReader#getRawDataType}.
 * 
 * @param variable
 *                The variable.
 * @return The data type, or {@link DataBuffer#TYPE_UNDEFINED} if unknown.
 * 
 * @see NetcdfImageReader#getRawDataType
 */
public static int getRawDataType(final VariableIF variable) {
  VariableDS ds = (VariableDS) variable;
  final DataType type = ds.getOriginalDataType();
  return transcodeNetCDFDataType(type,variable.isUnsigned());
}
origin: org.geotools/gt-netcdf

/**
 * Returns the data type which most closely represents the "raw" internal data of the variable.
 * This is the value returned by the default implementation of {@link
 * NetcdfImageReader#getRawDataType}.
 *
 * @param variable The variable.
 * @return The data type, or {@link DataBuffer#TYPE_UNDEFINED} if unknown.
 * @see NetcdfImageReader#getRawDataType
 */
public static int getRawDataType(final VariableIF variable) {
  VariableDS ds = (VariableDS) variable;
  final DataType type;
  if (Boolean.getBoolean(ENHANCE_SCALE_MISSING)) {
    type = ds.getDataType();
  } else {
    type = ds.getOriginalDataType();
  }
  return transcodeNetCDFDataType(type, variable.isUnsigned());
}
origin: edu.ucar/cdm

public void check(Formatter f) {
 for (Variable v : getVariables()) {
  VariableDS vds = (VariableDS) v;
  if (vds.getOriginalDataType() != vds.getDataType()) {
   f.format("Variable %s has type %s, org = %s%n", vds.getFullName(), vds.getOriginalDataType(), vds.getDataType());
  }
  if (vds.getOriginalVariable() != null) {
   Variable orgVar = vds.getOriginalVariable();
   if (orgVar.getRank() != vds.getRank())
    f.format("Variable %s has rank %d, org = %d%n", vds.getFullName(), vds.getRank(), orgVar.getRank());
  }
 }
}
origin: edu.ucar/netcdf

public void check(Formatter f) {
 for (Variable v : getVariables()) {
  VariableDS vds = (VariableDS) v;
  if (vds.getOriginalDataType() != vds.getDataType()) {
   f.format("Variable %s has type %s, org = %s%n", vds.getFullName(), vds.getOriginalDataType(), vds.getDataType());
  }
  if (vds.getOriginalVariable() != null) {
   Variable orgVar = vds.getOriginalVariable();
   if (orgVar.getRank() != vds.getRank())
    f.format("Variable %s has rank %d, org = %d%n", vds.getFullName(), vds.getRank(), orgVar.getRank());
  }
 }
}
origin: Unidata/thredds

public void check(Formatter f) {
 for (Variable v : getVariables()) {
  VariableDS vds = (VariableDS) v;
  if (vds.getOriginalDataType() != vds.getDataType()) {
   f.format("Variable %s has type %s, org = %s%n", vds.getFullName(), vds.getOriginalDataType(), vds.getDataType());
  }
  if (vds.getOriginalVariable() != null) {
   Variable orgVar = vds.getOriginalVariable();
   if (orgVar.getRank() != vds.getRank())
    f.format("Variable %s has rank %d, org = %d%n", vds.getFullName(), vds.getRank(), orgVar.getRank());
  }
 }
}
origin: edu.ucar/cdm

 DataType dtype = ((VariableDS) mainv).getOriginalDataType();
 if ((dtype != null) && (dtype != mainv.getDataType())) {
  System.out.printf("Original type = %s mainv type= %s%n", dtype, mainv.getDataType());
DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: Unidata/thredds

DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: Unidata/thredds

DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: Unidata/thredds

public void testDataset() {
 Variable v = ncfile.findVariable("lflx");
 assert v instanceof VariableDS;
 VariableDS vds = (VariableDS) v;
 assert vds.getOriginalDataType() == v.getDataType();
 Variable org = vds.getOriginalVariable();
 assert vds.getOriginalDataType() == org.getDataType();
 assert !(org instanceof VariableDS);
 assert v.getParentGroup().equals(org.getParentGroup());
 assert v.getParentGroup() != org.getParentGroup();
}
origin: edu.ucar/netcdf

DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: edu.ucar/cdm

@Override
public Array reallyRead(Variable mainv, CancelTask cancelTask) throws IOException {
 DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: Unidata/thredds

@Override
public Array reallyRead(Variable mainv, CancelTask cancelTask) throws IOException {
 DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: edu.ucar/cdm

 return reallyRead(mainv, cancelTask);
DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: Unidata/thredds

 return reallyRead(mainv, cancelTask);
DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: edu.ucar/cdm

DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: edu.ucar/cdm

DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: edu.ucar/netcdf

@Override
public Array reallyRead(Variable mainv, CancelTask cancelTask) throws IOException {
 DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: edu.ucar/netcdf

 return reallyRead(mainv, cancelTask);
DataType dtype = (mainv instanceof VariableDS) ? ((VariableDS) mainv).getOriginalDataType() : mainv.getDataType();
origin: Unidata/thredds

public void testDataset() {
 Variable v = ncfile.findVariable("ReletiveHumidity");
 assert v instanceof VariableDS;
 VariableDS vds = (VariableDS) v;
 assert vds.getOriginalDataType() == v.getDataType();
 Variable org = vds.getOriginalVariable();
 assert vds.getOriginalDataType() == org.getDataType();
 assert v.getParentGroup().equals(org.getParentGroup());
 assert v.getParentGroup() != org.getParentGroup();
 // its a VariableDS because the renaming causes a VariableDS wrapper.
 assert (org instanceof VariableDS);
 vds = (VariableDS) org;
 org = vds.getOriginalVariable();
 assert vds.getOriginalDataType() == org.getDataType();
 assert !(org instanceof VariableDS);
 assert v.getParentGroup().equals(org.getParentGroup());
 assert v.getParentGroup() != org.getParentGroup();
}
ucar.nc2.datasetVariableDSgetOriginalDataType

Javadoc

When this wraps another Variable, get the original Variable's DataType.

Popular methods of VariableDS

  • getCoordinateSystems
  • getDataType
  • isMissing
  • read
  • getRank
  • getShortName
  • getUnitsString
  • findAttribute
  • getShape
  • getDescription
  • getDimension
  • getDimensions
  • getDimension,
  • getDimensions,
  • getFullName,
  • getOriginalVariable,
  • hasMissing,
  • <init>,
  • addAttribute,
  • createNewCache,
  • getAttributes

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • setContentView (Activity)
  • Kernel (java.awt.image)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now