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

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

Best Java code snippets using ucar.nc2.ft2.coverage.CoverageCoordAxis1D.makeDate (Showing top 10 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

public Object getCoordObject(int index) {
 if (axisType == AxisType.RunTime)
  return makeDate(getCoordMidpoint(index));
 if (isInterval())
  return new double[]{getCoordEdge1(index), getCoordEdge2(index)};
 return getCoordMidpoint(index);
}
origin: Unidata/thredds

CalendarDate runDate = runAxisSubset.makeDate(val);
Optional<TimeOffsetAxis> too = timeOffset.subsetFromTime(params, runDate);
if (!too.isPresent())
origin: Unidata/thredds

@Test
public void testScalarRuntimeCoordinate() throws IOException {
 String filename = TestDir.cdmUnitTestDir + "ncss/GFS/CONUS_80km/GFS_CONUS_80km_20120227_0000.grib1.ncx4";
 String gridName = "Pressure_surface";
 try (FeatureDatasetCoverage cc = CoverageDatasetFactory.open(filename)) {
  Assert.assertNotNull(filename, cc);
  Assert.assertEquals(1, cc.getCoverageCollections().size());
  CoverageCollection cd = cc.getCoverageCollections().get(0);
  Coverage cov = cd.findCoverage(gridName);
  Assert.assertNotNull(gridName, cov);
  CoverageCoordSys csys = cov.getCoordSys();
  Assert.assertNotNull("CoverageCoordSys", csys);
  CoverageCoordAxis1D runtime = (CoverageCoordAxis1D) csys.getAxis(AxisType.RunTime);
  Assert.assertNotNull(AxisType.RunTime.toString(), runtime);
  Assert.assertTrue(runtime.getClass().getName(), runtime instanceof CoverageCoordAxis1D);
  Assert.assertEquals(CoverageCoordAxis.Spacing.regularPoint, runtime.getSpacing());
  Assert.assertEquals(CoverageCoordAxis.DependenceType.scalar, runtime.getDependenceType());
  CalendarDate startDate = runtime.makeDate(runtime.getCoordMidpoint(0));
  Assert.assertEquals(CalendarDate.parseISOformat(null, "2012-02-27T00:00:00Z"), startDate);
 }
}
origin: Unidata/thredds

CoverageCoordAxis1D timeAxis1D = (CoverageCoordAxis1D) timeAxis;
if (offsetVal != null)
  time = timeAxis1D.makeDate(offsetVal);
  CalendarDate lower = timeAxis1D.makeDate(timeAxis1D.getCoordEdge1(0));
  Assert.assertTrue("time coord lower", !lower.isAfter(time));          // lower <= time
  CalendarDate upper = timeAxis1D.makeDate(timeAxis1D.getCoordEdge2(0));
  Assert.assertTrue("time coord lower", !upper.isBefore(time));         // upper >= time
 } else {
  Assert.assertEquals("time coord", time, timeAxis1D.makeDate(timeAxis1D.getCoordMidpoint(0)));
origin: Unidata/thredds

assertNotNull("time", time);
Assert.assertEquals(1, time.getNcoords());
CalendarDate date = time.makeDate(time.getCoordMidpoint(0));
logger.debug("date = {}", date);
Assert.assertEquals(date, CalendarDate.parseISOformat(null, "2012-04-19T00:00:00Z"));
origin: Unidata/thredds

CoverageCoordAxis1D timeAxis1D = (CoverageCoordAxis1D) timeAxis;
if (timeAxis.isInterval()) {
 CalendarDate lower = timeAxis1D.makeDate(timeAxis1D.getCoordEdge1(0));
 Assert.assertTrue("time coord lower", !lower.isAfter(time));          // lower <= time
 CalendarDate upper = timeAxis1D.makeDate(timeAxis1D.getCoordEdge2(0));
 Assert.assertTrue("time coord lower", !upper.isBefore(time));         // upper >= time
 Assert.assertEquals("time coord", time, timeAxis1D.makeDate(timeAxis1D.getCoordMidpoint(0)));
origin: Unidata/thredds

assertNotNull("time", time);
Assert.assertEquals(1, time.getNcoords());
CalendarDate date = time.makeDate( time.getCoordMidpoint(0));
logger.debug("date = {}", date);
CalendarDate expected = CalendarDate.parseISOformat(Calendar.gregorian.toString(), "2002-12-01T00:00:00Z"); // CF i guess
origin: Unidata/thredds

Assert.assertEquals(1, runAxis.getNcoords());
double val = runAxis.getCoordMidpoint(0);
CalendarDate runDate = runAxis.makeDate(val);
Assert.assertEquals(rt_val, runDate);
Assert.assertEquals(1, runAxis.getNcoords());
double val = runAxis.getCoordMidpoint(0);
CalendarDate runDate = runAxis.makeDate(val);
if (rt_val != null)
 Assert.assertEquals(rt_val, runDate);
origin: Unidata/thredds

Assert.assertEquals(1, runAxis.getNcoords());
double val = runAxis.getCoordMidpoint(0);
CalendarDate runDate = runAxis.makeDate(val);
Assert.assertEquals(rt_val, runDate);
Assert.assertEquals(1, runAxis.getNcoords());
double val = runAxis.getCoordMidpoint(0);
CalendarDate runDate = runAxis.makeDate(val);
Assert.assertEquals(rt_val, runDate);
Assert.assertEquals(1, timeOffsetAxis.getNcoords());
ucar.nc2.ft2.coverageCoverageCoordAxis1DmakeDate

Popular methods of CoverageCoordAxis1D

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

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • 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