Codota Logo
CoverageCoordAxis1D.getEndValue
Code IndexAdd Codota to your IDE (free)

How to use
getEndValue
method
in
ucar.nc2.ft2.coverage.CoverageCoordAxis1D

Best Java code snippets using ucar.nc2.ft2.coverage.CoverageCoordAxis1D.getEndValue (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: Unidata/thredds

@Override
public String getSummary() {
 if (axisType != AxisType.RunTime)
  return super.getSummary();
 if (ncoords < 7) {
  Formatter f = new Formatter();
  for (int i = 0; i < ncoords; i++) {
   CalendarDate cd = makeDate(getCoordMidpoint(i));
   if (i > 0) f.format(", ");
   f.format("%s", cd);
  }
  return f.toString();
 }
 Formatter f = new Formatter();
 CalendarDate start = makeDate(getStartValue());
 f.format("start=%s", start);
 CalendarDate end = makeDate(getEndValue());
 f.format(", end=%s", end);
 f.format(" (npts=%d spacing=%s)", getNcoords(), getSpacing());
 return f.toString();
}
origin: Unidata/thredds

private Optional<CoverageCoordAxis> subsetLon(LatLonRect llbb, int stride) throws InvalidRangeException {
 double wantMin = LatLonPointImpl.lonNormalFrom(llbb.getLonMin(), lonAxis.getStartValue());
 double wantMax = LatLonPointImpl.lonNormalFrom(llbb.getLonMax(), lonAxis.getStartValue());
 double start = lonAxis.getStartValue();
 double end  = lonAxis.getEndValue();
 // use MAMath.MinMax as a container for two values, min and max
 List<MAMath.MinMax> lonIntvs = subsetLonIntervals(wantMin, wantMax, start, end);
 if (lonIntvs.size() == 0)
  return Optional.empty(String.format(
      "longitude want [%f,%f] does not intersect lon axis [%f,%f]", wantMin, wantMax, start, end));
 if (lonIntvs.size() == 1) {
  MAMath.MinMax lonIntv = lonIntvs.get(0);
  return lonAxis.subset(lonIntv.min, lonIntv.max, stride);
 }
 // this is the seam crossing case
 return lonAxis.subsetByIntervals(lonIntvs, stride);
}
origin: Unidata/thredds

public Optional<RangeIterator> makeRange(double minValue, double maxValue, int stride) {
 //if (axis.getSpacing() == CoverageCoordAxis.Spacing.discontiguousInterval)
 //  return subsetValuesDiscontinuous(minValue, maxValue, stride);
 double lower = axis.isAscending() ? Math.min(minValue, maxValue) : Math.max(minValue, maxValue);
 double upper = axis.isAscending() ? Math.max(minValue, maxValue) : Math.min(minValue, maxValue);
 int minIndex = findCoordElement(lower, false);
 int maxIndex = findCoordElement(upper, false);
 if (minIndex >= axis.getNcoords())
  return Optional.empty(String.format("no points in subset: lower %f > end %f", lower, axis.getEndValue()));
 if (maxIndex < 0)
  return Optional.empty(String.format("no points in subset: upper %f < start %f", upper, axis.getStartValue()));
 if (minIndex < 0)
  minIndex = 0;
 if (maxIndex >= axis.getNcoords())
  maxIndex = axis.getNcoords() - 1;
 int count = maxIndex - minIndex + 1;
 if (count <= 0)
  return Optional.empty("no points in subset");
 try {
  return Optional.of(new Range(minIndex, maxIndex, stride));
 } catch (InvalidRangeException e) {
  return Optional.empty(e.getMessage());
 }
}
origin: Unidata/thredds

private Optional<CoverageCoordAxisBuilder> subsetValues(double minValue, double maxValue, int stride) {
 if (axis.getSpacing() == CoverageCoordAxis.Spacing.discontiguousInterval)
  return subsetValuesDiscontinuous(minValue, maxValue, stride);
 double lower = axis.isAscending() ? Math.min(minValue, maxValue) : Math.max(minValue, maxValue);
 double upper = axis.isAscending() ? Math.max(minValue, maxValue) : Math.min(minValue, maxValue);
 int minIndex = findCoordElement(lower, false);
 int maxIndex = findCoordElement(upper, false);
 if (minIndex >= axis.getNcoords())
  return Optional.empty(String.format("no points in subset: lower %f > end %f", lower, axis.getEndValue()));
 if (maxIndex < 0)
  return Optional.empty(String.format("no points in subset: upper %f < start %f", upper, axis.getStartValue()));
 if (minIndex < 0)
  minIndex = 0;
 if (maxIndex >= axis.getNcoords())
  maxIndex = axis.getNcoords() - 1;
 int count = maxIndex - minIndex + 1;
 if (count <= 0)
  throw new IllegalArgumentException("no points in subset");
 try {
  return Optional.of(subsetByIndex(new Range(minIndex, maxIndex, stride)));
 } catch (InvalidRangeException e) {
  return Optional.empty(e.getMessage());
 }
}
origin: Unidata/thredds

Assert.assertEquals(291, xaxis.getNcoords());
Assert2.assertNearlyEquals(10.5, xaxis.getCoordMidpoint(0));
Assert2.assertNearlyEquals(300.5, xaxis.getEndValue()); // LOOK is that ok? BB = 10-300: its just catching the edge
Assert2.assertNearlyEquals(1.0, xaxis.getResolution());
Assert.assertEquals(81, yaxis.getNcoords());
Assert2.assertNearlyEquals(79.5, yaxis.getCoordMidpoint(0));
Assert2.assertNearlyEquals(-.5, yaxis.getEndValue()); // LOOK is that ok? BB = 0-80: its just catching the edge
Assert2.assertNearlyEquals(-1.0, yaxis.getResolution());
origin: Unidata/thredds

case regularPoint:
 builder.startValue = timeAxisSubset.getStartValue() + offset;
 builder.endValue = timeAxisSubset.getEndValue() + offset;
 break;
origin: Unidata/thredds

case regularPoint:
 builder.startValue = timeAxisSubset.getStartValue() + offset;
 builder.endValue = timeAxisSubset.getEndValue() + offset;
 break;
origin: Unidata/thredds

Assert.assertEquals(CoverageCoordAxis.Spacing.discontiguousInterval, timeAxis.getSpacing());
Assert2.assertNearlyEquals(0.0, timeAxis.getStartValue());
Assert2.assertNearlyEquals(384.0, timeAxis.getEndValue());
ucar.nc2.ft2.coverageCoverageCoordAxis1DgetEndValue

Popular methods of CoverageCoordAxis1D

  • getCoordMidpoint
  • getNcoords
  • getResolution
  • makeDate
  • <init>
  • getCoordEdge1
  • getCoordEdge2
  • getDependenceType
  • getSpacing
  • getStartValue
  • convert
  • copy
  • convert,
  • copy,
  • getAxisType,
  • getCalendar,
  • getCalendarDateUnit,
  • getCoordEdgeFirst,
  • getCoordEdgeLast,
  • getCoordObject,
  • getCoordsAsArray

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Collectors (java.util.stream)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Option (scala)
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