Learn R Programming

MazamaSpatialUtils (version 0.7.6)

convertOSMTimezones: Convert OSM Timezone Shapefile

Description

Create a SpatialPolygonsDataFrame for world timezones.

Usage

convertOSMTimezones(nameOnly = FALSE, simplify = TRUE)

Value

Name of the dataset being created.

Arguments

nameOnly

Logical specifying whether to only return the name without creating the file.

simplify

Logical specifying whether to create "_05", _02" and "_01" versions of the file that are simplified to 5%, 2% and 1%.

Details

A world timezone shapefile is downloaded and converted to a SpatialPolygonsDataFrame with additional columns of data. The resulting file will be created in the spatial data directory which is set with setSpatialDataDir().

There are 2 timezones which have polygons but the associated rows in the dataframe have no data. These timezones also have no countryCode assigned. We hope to rectify this in a future release. These are the missing timezones:


> OSMTimezones@data$timezone[is.na(OSMTimezones$countryCode)]
 [1] "America/Nuuk"  "Asia/Qostanay"

References

https://github.com/evansiroky/timezone-boundary-builder

See Also

setSpatialDataDir

getVariable