Examples of TemporalCRS


Examples of org.geotools.imageio.metadataold.TemporalCRS

        //
        // Setting Temporal CRS
        //
        // //
        setHasTemporalCRS(true);
        final TemporalCRS tCRS = getTemporalCRS();
        tCRS.setDatum(new Identification("ISO8601", null, null, null));
       
        String startTime = null;
      String endTime = null;
      Date startDate = null;
    Date endDate = null;
    switch (hdf4_type){
      case APS:
        startTime = attributesMap.get("timeStart");
        endTime = attributesMap.get("timeEnd");
        startDate = HDF4Utilities.getDateTime(startTime, HDF4Utilities.APS_DATETIME_FORMAT);
        endDate = HDF4Utilities.getDateTime(endTime, HDF4Utilities.APS_DATETIME_FORMAT);
        break;
      case TeraScan:
        final String startDates = attributesMap.get("data_start_date");
        final String startTimes = attributesMap.get("data_start_time");
        final String endDates = attributesMap.get("data_end_date");
        final String endTimes = attributesMap.get("data_end_time");
        startTime = new StringBuilder(startDates).append(" ").append(startTimes).toString();
        endTime = new StringBuilder(endDates).append(" ").append(endTimes).toString();
        startDate = HDF4Utilities.getDateTime(startTime, HDF4Utilities.TERASCAN_DATETIME_FORMAT);
        endDate = HDF4Utilities.getDateTime(endTime, HDF4Utilities.TERASCAN_DATETIME_FORMAT);
        break;
      }
    if (startDate != null)
      startInstant = new DefaultInstant(new DefaultPosition(startDate));
    if (endDate != null
      endInstant = new DefaultInstant(new DefaultPosition(endDate));

    final String timeOrigin = startInstant.getPosition().getDateTime().toString();
    tCRS.addAxis(new Identification("TIME"), "future", "hours since "+ timeOrigin, null);
        tCRS.addOrigin(timeOrigin);
    }
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

                case JULIAN:           epoch = "4713-01-01 12:00:00"; days = 0;         break;
                default: throw new AssertionError(e);
            }
            final String        name   = e.name();
            final TemporalDatum datum  = e.datum();
            final TemporalCRS   crs    = e.crs();
            final Date          origin = datum.getOrigin();
            Validators.validate(crs);
            assertSame  (name, datum,          e.datum()); // Datum before CRS creation.
            assertSame  (name, crs.getDatum(), e.datum()); // Datum after CRS creation.
            assertEquals(name, epoch, format(origin));
            assertEquals(name, days, origin.getTime() / DAY_LENGTH - julianEpoch, 0);
        }
    }
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

            return (TemporalCRS) crs;
        }
        if (crs instanceof CompoundCRS) {
            final CompoundCRS cp = (CompoundCRS) crs;
            for (final CoordinateReferenceSystem c : cp.getComponents()) {
                final TemporalCRS candidate = getTemporalComponent(c);
                if (candidate != null) {
                    return candidate;
                }
            }
        }
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

        }

        if (name.getLocalPart().equals("timePosition")) {
            CoordinateReferenceSystem crs = envelope.getCoordinateReferenceSystem();

            TemporalCRS temporalCRS = null;

            if (crs instanceof CompoundCRS) {
                List CRSs = ((DefaultCompoundCRS) crs).getCoordinateReferenceSystems();

                for (Object item : CRSs) {
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

        return verticalCRS;
    }

    public static TemporalCRS buildTemporalCrs( CoordinateAxis timeAxis ) {
        String t_datumName = new Identification("ISO8601", null, null, null).getName();
        TemporalCRS temporalCRS = null;
        try {
            if (timeAxis != null) {
                AxisType type = timeAxis.getAxisType();
                String units = timeAxis.getUnitsString();
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

        }

        if (name.getLocalPart().equals("timePosition")) {
            CoordinateReferenceSystem crs = envelope.getCoordinateReferenceSystem();

            TemporalCRS temporalCRS = null;

            if (crs instanceof CompoundCRS) {
                List CRSs = ((DefaultCompoundCRS) crs).getCoordinateReferenceSystems();

                for (Object item : CRSs) {
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

            CoordinateAxis timeAxis = cvs.get(0);
            assertNotNull(timeAxis);
            assertEquals(AxisType.Time, timeAxis.getAxisType());

            final TemporalCRS temporalCrs = NetCDFCRSUtilities.buildTemporalCrs(timeAxis);
            assertNotNull(temporalCrs);
            assertTrue(temporalCrs instanceof DefaultTemporalCRS);

            CoordinateAxis verticalAxis = cvs.get(1);
            assertNotNull(verticalAxis);
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

            return (TemporalCRS) crs;
        }
        if (crs instanceof CompoundCRS) {
            final CompoundCRS cp = (CompoundCRS) crs;
            for (final CoordinateReferenceSystem c : cp.getCoordinateReferenceSystems()) {
                final TemporalCRS candidate = getTemporalCRS(c);
                if (candidate != null) {
                    return candidate;
                }
            }
        }
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

    return crs;
  }

  public TemporalCRS createTemporalCRS(String code) throws FactoryException {
    final String key = toKey(code);
    TemporalCRS crs = (TemporalCRS) cache.get(key);
    if (crs == null) {
      try {
        cache.writeLock(key);
        crs = (TemporalCRS) cache.peek(key);
        if (crs == null) {
View Full Code Here

Examples of org.opengis.referencing.crs.TemporalCRS

    return crs;
  }

  public TemporalCRS createTemporalCRS(String code) throws FactoryException {
    final String key = toKey(code);
    TemporalCRS crs = (TemporalCRS) cache.get(key);
    if (crs == null) {
      try {
        cache.writeLock(key);
        crs = (TemporalCRS) cache.peek(key);
        if (crs == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.