[R] from long/lat to UTM

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Thu Mar 10 17:13:01 CET 2005


On 10-Mar-05 Gabor Grothendieck wrote:
>  <Ted.Harding <at> nessie.mcc.ac.uk> writes:
>: [...]
>: As Sander says, "Not sure where you would derive the time zone!".
>: 
>: Unless you can refer a (long,lat) position to a look-up
>: table, you can't predict what the zone will be to less
>: the 1 hour (except of course for the "nominal" time-zones
>: by 15deg sectors). I've never encountered a "digital"
>: version of such a table (my Atlas must be based on one,
>: though).
>: 
>: Best wishes,
>: Ted.
> 
> The fBasics package of the rmetrics project uses the Olsen time
> zone data base which does take some of these things into account.

Thanks, Gabor! However, this seems to be just the usual sort
of thing -- TimeZone name with corresponding TZ data. You first
have to know the TZ name. (Unless I have overlooked sonething
in the Olsen database).

What I had in mind was a "look-up" facility whereby a (long,lat)
pair could be submitted as a query, returning the TZ region
(name) within which that geographical point lay.

The only completely general mechanism I can think of would
consist of

a) a named list of boundary contours
b) a function which, for each name in the list, returns
   the TZ name

Then, for instance, given a point P = (long,lat), the list
could be searched by verifying, for each contour in the list,
whether the point lay in the region circumscribed by the
coutour (e.g. by computing the winding number for the contour
with respect to the point). This would also work for regions
with holes in them, provided the  boundary of the hole was
presented in the correct order of points (e.g. such that the
region of which it was the boundary lies to the left as you
go through the sequence).

If, for instance, I had the contour data for the TZ map
in my Atlas, I could construct such a thing! But, as I say,
I have not come across such a dataset. I'd be interested
to learn of one, though!

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 10-Mar-05                                       Time: 16:13:01
------------------------------ XFMail ------------------------------




More information about the R-help mailing list