DirectPositions and temporal coordinate reference systems

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DirectPositions and temporal coordinate reference systems

Jon Blower
Hi all,

DirectPosition objects can contain a position with respect to a
temporal coordinate reference system, however, I have not seen this
facility used very much.  In my existing code, I tend to hold dates
and times as Java Date objects, or sometimes Joda-time DateTime
objects.  Are there any tools or routines for easily translating these
objects into corresponding temporal CRSs and positions?

DirectPositions expose their coordinate values as doubles, so they are
imprecise.  This presumably means that accuracy is lost when
translating from a millisecond-precise Date value (or equivalent)?

My community uses a variety of calendar systems.  These can be a
little esoteric (e.g. 360-day years) so I will probably have to define
my own temporal CRSs.  Where would be a good place to look for
guidance?

Is anyone in a position to comment on the relative merits of GeoTools
and JScience for the above problems?

Thanks, Jon

--
--------------------------------------------------------------
Dr Jon Blower Tel: +44 118 378 5213 (direct line)
Technical Director Tel: +44 118 378 8741 (ESSC)
Reading e-Science Centre Fax: +44 118 378 6413
ESSC Email: [hidden email]
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: DirectPositions and temporal coordinate reference systems

Martin Desruisseaux
Jon Blower a écrit :
> DirectPosition objects can contain a position with respect to a
> temporal coordinate reference system, however, I have not seen this
> facility used very much.

This is true that we don't use much in GeoTools yes. We use it much more
extensively in postgrid however (actually postgrid is totally based on that
approach).


   In my existing code, I tend to hold dates
> and times as Java Date objects, or sometimes Joda-time DateTime
> objects.  Are there any tools or routines for easily translating these
> objects into corresponding temporal CRSs and positions?

If your TemporalCRS is actually a GeoTools implementation, you can use the
"toDate" and "toValue" convenience methods:

http://javadoc.geotools.fr/snapshot/org/geotools/referencing/crs/DefaultTemporalCRS.html#toDate(double)


> DirectPositions expose their coordinate values as doubles, so they are
> imprecise.  This presumably means that accuracy is lost when
> translating from a millisecond-precise Date value (or equivalent)?

Yes. However for dates express as days ellapsed since January 1st 2000 (I'm just
taking an arbitrary epoch), the lost of milliseconds precisions occurs only in
about 90000 years before or after year 2000. For dates inside that time range,
the precision is actually better than milliseconds (closer you are from the
epoch, better is the precision). For dates after year 90000, precision is lower
but you can go further in the future (or in the past).


> My community uses a variety of calendar systems.  These can be a
> little esoteric (e.g. 360-day years) so I will probably have to define
> my own temporal CRSs.  Where would be a good place to look for
> guidance?

Maybe looking at current DefaultTemporalCRS implementation if you wish, copying
and modifying it as you need. Actually I don't have clear guidance yet.


> Is anyone in a position to comment on the relative merits of GeoTools
> and JScience for the above problems?

I have not looked at JScience...

        Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: DirectPositions and temporal coordinate reference systems

Jon Blower-2
Hi Martin,

To resurrect an old question (see below) - I've been thinking again
about the question of temporal CRSs and calendar systems.  Are the two
things independent?  The temporal CRS gives you the number of time
units since a certain time, but a calendar system tells you how this
translates into a date/time such as 20th August 2009.  So perhaps the
handling of calendar systems is outside the scope of GeoTools?

A related question - how can one use GeoTools to convert between
DirectPositions in a temporal CRS and TemporalPositions?  Presumably
such a method would have to have some knowledge of the calendar
system?

Cheers,
Jon

On Mon, Jul 28, 2008 at 6:11 PM, Martin Desruisseaux
<[hidden email]> wrote:

> Jon Blower a écrit :
>>
>> DirectPosition objects can contain a position with respect to a
>> temporal coordinate reference system, however, I have not seen this
>> facility used very much.
>
> This is true that we don't use much in GeoTools yes. We use it much more
> extensively in postgrid however (actually postgrid is totally based on that
> approach).
>
>
>  In my existing code, I tend to hold dates
>>
>> and times as Java Date objects, or sometimes Joda-time DateTime
>> objects.  Are there any tools or routines for easily translating these
>> objects into corresponding temporal CRSs and positions?
>
> If your TemporalCRS is actually a GeoTools implementation, you can use the
> "toDate" and "toValue" convenience methods:
>
> http://javadoc.geotools.fr/snapshot/org/geotools/referencing/crs/DefaultTemporalCRS.html#toDate(double)
>
>
>> DirectPositions expose their coordinate values as doubles, so they are
>> imprecise.  This presumably means that accuracy is lost when
>> translating from a millisecond-precise Date value (or equivalent)?
>
> Yes. However for dates express as days ellapsed since January 1st 2000 (I'm
> just taking an arbitrary epoch), the lost of milliseconds precisions occurs
> only in about 90000 years before or after year 2000. For dates inside that
> time range, the precision is actually better than milliseconds (closer you
> are from the epoch, better is the precision). For dates after year 90000,
> precision is lower but you can go further in the future (or in the past).
>
>
>> My community uses a variety of calendar systems.  These can be a
>> little esoteric (e.g. 360-day years) so I will probably have to define
>> my own temporal CRSs.  Where would be a good place to look for
>> guidance?
>
> Maybe looking at current DefaultTemporalCRS implementation if you wish,
> copying and modifying it as you need. Actually I don't have clear guidance
> yet.
>
>
>> Is anyone in a position to comment on the relative merits of GeoTools
>> and JScience for the above problems?
>
> I have not looked at JScience...
>
>        Martin
>



--
Dr Jon Blower
Technical Director, Reading e-Science Centre
Environmental Systems Science Centre
University of Reading
Harry Pitt Building, 3 Earley Gate
Reading RG6 6AL. UK
Tel: +44 (0)118 378 5213
Fax: +44 (0)118 378 6413
[hidden email]
http://www.nerc-essc.ac.uk/People/Staff/Blower_J.htm

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: DirectPositions and temporal coordinate reference systems

Martin Desruisseaux
Hello Jon

Jon Blower a écrit :
> To resurrect an old question (see below) - I've been thinking again
> about the question of temporal CRSs and calendar systems.  Are the two
> things independent?  The temporal CRS gives you the number of time
> units since a certain time, but a calendar system tells you how this
> translates into a date/time such as 20th August 2009.  So perhaps the
> handling of calendar systems is outside the scope of GeoTools?

I tend to see them as two independant issues, and to see calander systems as
outside the scope of at least the core referencing system.

To be more accurate I tend to see calendar systems as being more a formatting
issue (admitly linked to astronomical cycles). The referencing module (in its
current implementation) is concerned about giving a point in space and time
without ambiguity using linear scales (or "interval" scales if we adopt the
terminology given at http://en.wikipedia.org/wiki/Level_of_measurement ). The
restriction to such scales aims to garantee that familiar operators like + - * /
still valid in that space (actually this is not so simple; see the above link
for the list of allowed operations).

The same point in time could be formatted as "27 July 1794" or "9 Thermidor An
II" - in standard Java it would be the job of two different java.text.DateFormat
instances formatting the same java.util.Date object. I would be tempted to keep
the same distinction in GeoTools. I don't think that a calendar system should be
associated to a TemporalCRS because I don't see that as a one-to-one association
(the same date can be formatted in different way).

The distinction may seems arbitrary. The referencing module do allow geographic
ordinates to be expressed in degrees, gradians or even in degrees.minutes
formats, so why not allowing different calendar systems as well? I would said
that the scope of the referencing module should be restricted to "interval
scales". Degrees and gradians are interval scales. Degrees.minutes are not,
which is a violation of the above statement but as been done only because EPSG
do so (otherwise I would not have introduced degrees.minutes in the referencing
module - I would have left this job to org.geotools.measure.AngleFormat only).

However I believe that ISO 19108 provides the calendar systems handling you are
looking for. I'm not sure how ISO relates that to the referencing interfaces
(ISO 19111) however. I would expect independant objects (like Date / DateFormat)
rather than specialization of CoordinateReferenceSystem, but need to check for
being sure.


> A related question - how can one use GeoTools to convert between
> DirectPositions in a temporal CRS and TemporalPositions?  Presumably
> such a method would have to have some knowledge of the calendar
> system?

Yes. I would expect this knowledge to be on the TemporalPosition side. Looking
at GeoAPI interface I see that TemporalPosition has many subinterfaces,
including CalendarDate, JulianDate, etc. So maybe an implementation needs to
check which TemporalPosition interface is used.

I have no idea how it is implemented in GeoTools however, since I have not yet
looked at the temporal package.

        Martin

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users