0 Replies Latest reply: Mar 18, 2013 3:52 PM by 716245 RSS

    Pixel Based Time Zone Determination

      Anselm Hook, used the Olson data shapes to create a projection map in which each pixel in the map uses its (9-bit) color to represent the Olson timezone. (Each each pixel apparently works out to ~12.145 square miles.)

      He then converts the lat and long into an (x,y) pixel local on the map, reads the color of the pixel, and uses it as an index into an array of Olson timezone strings. This provides an extremely fast, in-memory lookup of the timezone, which can then be used to retrieve the time offset from UTC from a platform-appropriate implementation of the tz database, such as java.util.TimeZone, or the Ruby TZInfo gem.

      Anselm’s approach is documented here: http://blog.makerlab.org/2009/05/olson-code-timezones-geekery/.

      Any comments on the Pros / Cons of this approach vs. importing the TZ data into an Oracle Table (SDO_GEOM) and using Oracle Locator to perform an point in poly? Accuracy for example.