Codota Logo
ucar.nc2.dataset
Code IndexAdd Codota to your IDE (free)

How to use ucar.nc2.dataset

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: geotools/geotools

List<Attribute> getGlobalAttributes() {
  if (dataset != null) {
    return dataset.getGlobalAttributes();
  }
  return null;
}
origin: geotools/geotools

public double getIncrement() {
  if (!(coordinateAxis instanceof CoordinateAxis1D)) {
    return Double.NaN;
  }
  return convertAxis
      ? ((CoordinateAxis1D) coordinateAxis).getIncrement() * conversionFactor
      : ((CoordinateAxis1D) coordinateAxis).getIncrement();
}
origin: geotools/geotools

  @Override
  public List<CoordinateAxis> getCoordinateAxes() {
    return cs.getCoordinateAxes();
  }
}
origin: geotools/geotools

@Override
public boolean canHandle(CoordinateAxis axis) {
  if (axis != null
      && "time".equalsIgnoreCase(axis.getShortName())
      && CLIMATOLOGICAL_UNITS.equalsIgnoreCase(axis.getUnitsString())) {
    if (LOGGER.isLoggable(Level.FINEST)) {
      LOGGER.finest("Climatological Time Handler Spi can handle the axis");
    }
    return true;
  }
  return false;
}
origin: geotools/geotools

/** Wraps a generic exception into a {@link IIOException}. */
protected IIOException netcdfFailure(final Exception e) throws IOException {
  return new IIOException(
      new StringBuilder("Can't read file ").append(dataset.getLocation()).toString(), e);
}
origin: geotools/geotools

private String getTimeAttribute(CoordinateSystem cs) {
  CoordinateAxis timeAxis = cs.getTaxis();
  String name = timeAxis != null ? timeAxis.getFullName() : NetCDFUtilities.TIME_DIM;
  DimensionMapper dimensionMapper = reader.georeferencing.getDimensionMapper();
  String timeAttribute = dimensionMapper.getDimension(name.toUpperCase());
  if (timeAttribute == null) {
    // Fallback on standard name
    timeAttribute = dimensionMapper.getDimension(NetCDFUtilities.TIME_DIM);
  }
  return timeAttribute;
}
origin: geotools/geotools

public AxisType getAxisType() {
  return coordinateAxis.getAxisType();
}
origin: geotools/geotools

public String getUnit() {
  return coordinateAxis.getUnitsString();
}
origin: geotools/geotools

public double getStart() {
  if (!(coordinateAxis instanceof CoordinateAxis1D)) {
    return Double.NaN;
  }
  return convertAxis
      ? ((CoordinateAxis1D) coordinateAxis).getStart() * conversionFactor
      : ((CoordinateAxis1D) coordinateAxis).getStart();
}
origin: geotools/geotools

public boolean isRegular() {
  return coordinateAxis instanceof CoordinateAxis1D
      && ((CoordinateAxis1D) coordinateAxis).isRegular();
}
origin: geotools/geotools

public String getName() {
  return coordinateAxis.getShortName();
}
origin: geotools/geotools

private synchronized Array readSection(VariableAdapter wrapper, Section section)
    throws IIOException, IOException {
  try {
    // Due to underlying NetCDF file system access (RAF based)
    // and internal caching we do this call within a
    // synchronized block
    return wrapper.variableDS.read(section);
  } catch (InvalidRangeException e) {
    throw netcdfFailure(e);
  }
}
origin: geotools/geotools

public static NetcdfDataset acquireDataset(URI uri) throws IOException {
  if (getFormat(uri) == FileFormat.FC) {
    return acquireFeatureCollection(uri.toString());
  } else {
    return NetcdfDataset.acquireDataset(uri.toString(), null);
  }
}
origin: geotools/geotools

public int getRank() {
  return variableDS.getRank() - ignoredDimensions.size();
}
origin: geotools/geotools

/** @return the shape */
public int[] getShape() {
  return variableDS.getShape();
}
origin: geotools/geotools

@Override
public CoordinateAxis getTaxis() {
  return cs.getTaxis();
}
origin: geotools/geotools

public VariableAdapter(NetCDFImageReader reader, Name coverageName, VariableDS variable)
    throws Exception {
  this.variableDS = variable;
  this.reader = reader;
  this.coverageName = coverageName;
  setName(variable.getFullName());
  init();
}
origin: geotools/geotools

/**
 * Look for a SPATIAL_REF global attribute and parsing it (as WKT) to setup a {@link
 * CoordinateReferenceSystem}
 *
 * @param dataset
 * @return
 */
public static CoordinateReferenceSystem parseProjection(NetcdfDataset dataset) {
  Attribute attribute = dataset.findAttribute(NetCDFUtilities.SPATIAL_REF);
  return CRSParser.parseWKT(attribute);
}
origin: geotools/geotools

@Override
public boolean hasTimeAxis() {
  return cs.hasTimeAxis();
}
origin: geotools/geotools

protected boolean isMissing(Object val) {
  if (val instanceof Number) {
    return coordinateAxis.isMissing(((Number) val).doubleValue());
  } else {
    return val == null;
  }
}
ucar.nc2.dataset

Most used classes

  • NetcdfDataset
    NetcdfDataset extends the netCDF API, adding standard attribute parsing such as scale and offset, an
  • CoordinateAxis1D
    A 1-dimensional Coordinate Axis. Its values must be monotonic. If this is char valued, it will have
  • CoordinateAxis
    A Coordinate Axis is a Variable that specifies one of the coordinates of a CoordinateSystem. Mathema
  • VariableDS
    A wrapper around a Variable, creating an "enhanced" Variable. The original Variable is used for the
  • CoordinateAxis1DTime
    A 1-dimensional Coordinate Axis representing Calendar time. Its coordinate values can be represented
  • StructureDS,
  • DatasetUrl,
  • SequenceDS,
  • VariableEnhanced,
  • CoordinateAxis2D,
  • CoordinateTransform,
  • ProjectionCT,
  • StructurePseudoDS,
  • VerticalCT,
  • CoordTransBuilder,
  • CoordinateAxisTimeHelper,
  • TransformType,
  • CF1Convention,
  • WRFConvention
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