Package org.opengis.temporal

Examples of org.opengis.temporal.Position


            }

            if (temporalCRS != null) {
                List<Position> envelopePositions = new LinkedList<Position>();

                Position beginning = new DefaultPosition(((DefaultTemporalCRS) temporalCRS).toDate(envelope.getLowerCorner().getOrdinate(envelope.getDimension() - 1)));
                Position ending = new DefaultPosition(((DefaultTemporalCRS) temporalCRS).toDate(envelope.getUpperCorner().getOrdinate(envelope.getDimension() - 1)));

                envelopePositions.add(beginning);
                envelopePositions.add(ending);

                return envelopePositions;
View Full Code Here


                // Creating the Temporal Datum
                if (t_datumName == null) {
                    t_datumName = "Unknown";
                }
                final Map<String, String> datumMap = Collections.singletonMap("name", t_datumName);
                final Position timeOrigin = new DefaultPosition(new SimpleInternationalString(t_originDate));
                final TemporalDatum temporalDatum = NetCDFCRSUtilities.FACTORY_CONTAINER.getDatumFactory().createTemporalDatum(datumMap, timeOrigin.getDate());

                // Finally creating the Temporal CoordinateReferenceSystem
                String crsName = "time_CRS";
                final Map<String, String> crsMap = Collections.singletonMap("name", crsName);
                temporalCRS = NetCDFCRSUtilities.FACTORY_CONTAINER.getCRSFactory().createTemporalCRS(crsMap, temporalDatum, timeCS);
View Full Code Here

            }

            if (temporalCRS != null) {
                List<Position> envelopePositions = new LinkedList<Position>();

                Position beginning = new DefaultPosition(
                        ((DefaultTemporalCRS) temporalCRS).toDate(envelope.getLowerCorner().getOrdinate(envelope.getDimension() - 1)));
                Position ending = new DefaultPosition(
                        ((DefaultTemporalCRS) temporalCRS).toDate(envelope.getUpperCorner().getOrdinate(envelope.getDimension() - 1)));

                envelopePositions.add(beginning);
                envelopePositions.add(ending);
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

     * <!-- end-user-doc -->
     */
    @Override
    public Element encode(Object object, Document document, Element value)
            throws Exception {
        Position timePosition = (Position) object;

        if (timePosition == null) {
            value.appendChild(document.createElementNS(GML.NAMESPACE, org.geotools.gml3.GML.Null.getLocalPart()));
        }

        value.appendChild(document.createTextNode(timePosition.getDateTime().toString()));
        return null;
    }
View Full Code Here

        value.appendChild(document.createTextNode(timePosition.getDateTime().toString()));
        return null;
    }

    public Object getProperty(Object object, QName name) {
        Position value = (Position) object;
       
        if (name.getLocalPart().equals("frame")) {
            return "ISO-8601";
        }
       
View Full Code Here

            PeriodNode periodNode = (PeriodNode) item.getBuilt();
            Literal begin = periodNode.getBeginning();
            Literal end = periodNode.getEnding();
           
        Position ip1 = new DefaultPosition((Date) begin.getValue());
        Position ip2 = new DefaultPosition((Date) end.getValue());
        Period period = new DefaultPeriod(new DefaultInstant(ip1),new DefaultInstant(ip2 ));
           
            return period;
           
        } catch (ClassCastException cce) {
View Full Code Here

     * <!-- begin-user-doc --> <!-- end-user-doc -->
     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        Position pos = (Position) node.getChildValue(Position.class);
        return new DefaultInstant(pos);
    }
View Full Code Here

    public void testDistance() {
        TemporalGeometricPrimitive other;

        //calcul Distance with instant objects
        cal.set(2000, 0, 1);
        Position position = new DefaultPosition(cal.getTime());
        other = new DefaultInstant(position);
        Duration result = temporalGeomericPrimitive1.distance(other);
        assertFalse(temporalGeomericPrimitive2.distance(other).equals(result));

        //calcul Distance with instant and period
View Full Code Here

    public void testRelativePosition() {
        TemporalPrimitive other;

        //relative position between Instant objects
        cal.set(2000, 0, 1);
        Position position = new DefaultPosition(cal.getTime());
        other = new DefaultInstant(position);
        RelativePosition result = temporalPrimitive1.relativePosition(other);
        assertFalse(temporalPrimitive2.relativePosition(other).equals(result));

        //relative position between Instant and Period
View Full Code Here

TOP

Related Classes of org.opengis.temporal.Position

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.