[R-sig-Geo] Timezone boundaries (for adding to world map)?
Roger Bivand
Roger.Bivand at nhh.no
Fri Feb 20 09:55:52 CET 2009
On Wed, 18 Feb 2009, Greg Snow wrote:
> There is a shapefile (works well with maptools and sp packages) with a
> world map and time zone information at:
> http://openmap.bbn.com/data/shape/timezone/
>
> It has the info needed to color the countries or parts of countries
> based on time zone, but does not have polygons for time zone stripes
> over the oceans.
In fact, this shapefile provoked an update in sp, because it is really
buggy. There are straight-line polygons and many others have multiple
repeated coordinates (the sp update fixes these to retain finite label
points), but it doesn't fix the absence of most of the data (several DBF
columns are empty - checked in oocalc):
> library(rgdal)
> tz <- readOGR(".", "WrldTZA")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "WrldTZA"
with 1890 rows and 11 columns
Feature type: wkbPolygon with 2 dimensions
Warning messages:
1: In Polygon(cbind(jG[[1]], jG[[2]])) :
Non-finite label point detected and replaced
2: In Polygon(cbind(jG[[1]], jG[[2]])) :
Non-finite label point detected and replaced
3: In Polygon(cbind(jG[[1]], jG[[2]])) :
Non-finite label point detected and replaced
> names(tz)
[1] "FIPS" "NAME" "COMMENTS" "REGION" "LAT" "LON"
[7] "TZ" "GMTOFF" "LOCALSUM" "OFFSET" "CLASSES"
> summary(tz$GMTOFF)
NA's
1890
> summary(tz$TZ)
NA's
1890
> summary(tz$OFFSET)
0 \xff0 -1 \xff-1 \xff+1 -10 +10
25 57 13 7 181 24 38
\xff+10 +10.5 +11 +11.5 +12 \xff+12 +2
24 1 19 3 12 13 1
\xff-2 \xff+2 +3 \xff-3 \xff+3 -3.5 \xff+3.5
4 90 59 146 25 7 3
-4 +4 \xff-4 \xff+4 \xff+4.5 -5 +5
56 4 165 8 1 130 13
\xff-5 \xff+5 \xff+5.5 \xff+5.75 -6 +6 \xff-6
12 3 16 1 77 10 16
\xff+6 \xff+6.5 -7 +7 \xff+7 -8 +8
12 15 63 98 14 61 68
\xff-8 \xff+8 -9 +9 \xff+9 +9.5 NA's
3 56 82 97 13 11 33
where my locale is UTF-8.
I wrote to Martin offline that a more recent link is:
http://efele.net/maps/tz/world/
and I've put tz_world.rda on http://spatial.nhh.no/R/etc, but it is not
line generalised, so it is very large and takes a long time to display -
they've kept a lot of boundary detail.
Because TZ follow administrative boundaries, they are actually hard to do
right. Maybe a raster version might help more if vector precision isn't
needed?
Roger
>
> Hope this helps,
>
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list