Package org.geotools.temporal.object

Examples of org.geotools.temporal.object.DefaultPosition


    protected Date date(String date) throws ParseException {
        return FORMAT.parse(date);
    }
   
    protected Instant instant(String d) throws ParseException {
        return new DefaultInstant(new DefaultPosition(date(d)));
    }
View Full Code Here


    protected Date date(String date) throws ParseException {
        return df.parse(date);
    }

    protected Instant instant(String d) throws ParseException {
        return new DefaultInstant(new DefaultPosition(date(d)));
    }
View Full Code Here

        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

    // use the default implementations from gt-main

    DateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
    Date date1 = FORMAT.parse("2001-07-05T12:08:56.235-0700");
    Instant temporalInstant = new DefaultInstant(new DefaultPosition(date1));

    // Simple check if property is after provided temporal instant
    Filter after = ff.after(ff.property("date"), ff.literal(temporalInstant));

    // can also check of property is within a certain period
    Date date2 = FORMAT.parse("2001-07-04T12:08:56.235-0700");
    Instant temporalInstant2 = new DefaultInstant(new DefaultPosition(date2));
    Period period = new DefaultPeriod(temporalInstant, temporalInstant2);

    Filter within = ff.toverlaps(ff.property("constructed_date"),
            ff.literal(period));
    // temporal end
View Full Code Here

    protected Date date(String date) throws ParseException {
        return FORMAT.parse(date);
    }

    protected Instant instant(String d) throws ParseException {
        return new DefaultInstant(new DefaultPosition(date(d)));
    }
View Full Code Here

       
        if (date == null) {
            throw new IllegalArgumentException("Unable to parse " + value);
        }

        return new DefaultPosition(date);
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        Position timePosition = new DefaultPosition(new SimpleInternationalString((String) value));
        return timePosition;
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        Position timePosition = new DefaultPosition(new SimpleInternationalString((String) value));
        return timePosition;
    }
View Full Code Here

TOP

Related Classes of org.geotools.temporal.object.DefaultPosition

Copyright © 2018 www.massapicom. 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.