September 07, 2005

Time in GML

Geography is not only concerned with space and neither is GML. The temporal.xsd schema (see http://schemas.opengis.net/gml/3.1.1/base/temporal.xsd ) contains a set of useful definitions for time related objects and properties.  The simplest of these is TimeInstant.

A TimeInstant is what it says - an instant in time. It has a single child (property) called timePosition.  A TimeInstant is thus written:

<TimeInstant>
    <timePosition>1876-08-01</timePosition>
</TimeInstant>

Of course not all times are instants - some are TimePeriods.  For these we can write:

<TimePeriod>
    <begin>
        <TimeInstant>
            <timePosition>1876-08-01</timePosition>
        </TimeInstant>
    </begin>
    <end>
        <TimeInstant>
            <timePosition>1876-08-02</timePosition>
        </TimeInstant>
    </end>
</TimePeriod>

Of course GML can provide a number of ways of expressing time durations and time lengths as well and can deal with non-ISO times and dates (need a Geological Calendar?) but that is beyond our scope for now.

 
Posted by RLake at 05:43:25 | Permanent Link | Comments (0) |
Comments
Write a comment