Geocoding with time zone information

Is there a good way to get timezone information with DST information from a lat / long coordinate or physical address?

I found several web services that seem to offer this service, but I cannot say how reliable they are or if they can disappear at some point. I need something for my application that will last a long time.

Are these services reliable and long-term? Are there any other better options?

+6
timezone rest web-services geolocation geocoding
source share
3 answers

The answer in this other question is an excellent solution to this question - Determining the time zone from latitude / longitude without using web services like Geonames.org

+1
source share

I searched for a long time to find a database that I could locally localize to map lat + lon coordinates to the time zone (i.e. no dependency on the remote service). This is the best I could come up with.

A vectorized timezone map is available here: http://georezo.net/jparis/Data/wrldtz_tab.htm . This is a database of nearly 2,000 "regions." Each area is defined by a multitude of polygons on the surface of the Earth, and it tells you what time zone you are in if you are inside this region.

There are major disadvantages:

  • It has not been updated since 2002.
  • It only defines polygons above the ground (if you are above water, you are not considered to be in any time zone).
  • This does not give you Olson IDs for time zones, only the name of the country and the UTC offset (standard time).

The last limitation may not be a big problem for you: there are not many time zones, and perhaps you can invest time to manually assign each of your Olson names (especially if you are only interested in a small number of time zones).

To read data files that you can download from the above website, you will need to use this library . I could come up with sample code if you are interested.

The use of a physical (postal) address is also mentioned. Translating this data into lat + lon coordinates is a whole separate issue, and I assume that you cannot handle this well without using any online / remote service.

-Phil

+1
source share

tauren. I would suggest using GeoIP with MaxMind.

I wrote a post on how to use Geolocation with time zone support in Django, but the same approach can be applied to other languages.

http://www.konstruktor.ee/blog/geolocation-with-time-zone-support-in-django

GeoIP has many bindings for different languages.

http://www.maxmind.com/app/api

I think that ultimately this is the most reliable solution to use.

0
source share

All Articles