
Thanks. Although, the timezoneId is not given (or doesn't exists?) when the coordinates are in the water, I was able to determine the closest timezoneId by using the geonames url with the radius option. I would suggest adding the radius argument in the GNtimezone function.
 
Francois Rousseu  
 
 
> Date: Tue, 7 Dec 2010 17:58:32 +0000
> From: b.rowlingson@lancaster.ac.uk
> To: r-sig-geo@r-project.org
> Subject: Re: [R-sig-Geo] time zones overwater?
> 
> On Tue, Dec 7, 2010 at 4:57 PM, Francois Rousseu
> <francoisrousseu@hotmail.com> wrote:
> >
> > Hello
> >
> > I need to determine time zone location (eg. America/Montreal) for several latlon coordinates mostly in North America. I found some freely available .shp files giving polygons for the various time zones, but the polygons exclude most large bodies of water. For example, coordinates falling in the Great Lakes or between islands in the canadian arctic are not associated with any time zone. Does anybody know of some freely available .shp files or any other way to obtain an ID for these zones to be able to get the correct time?
> 
> www.geonames.org can help, my geonames package can query it from R,
> and you can get timezone offsets:
> 
> > library(geonames)
> Loading required package: rjson
> 
> > GNtimezone(lng=37,lat=0)
> time countryName sunset rawOffset dstOffset countryCode
> 1 2010-12-07 20:57 Kenya 2010-12-07 18:27 3 3 KE
> gmtOffset lng sunrise timezoneId lat
> 1 3 37 2010-12-07 06:19 Africa/Nairobi 0
> 
> Barry
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
 		 	   		  
	[[alternative HTML version deleted]]

