latlong

The latlong package maps from a latitude and longitude to a timezone.

  • Owner: Brad Fitzpatrick point_right projecs by owner (0)
  • Platform:
  • License:: Apache License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

This is a Go package which maps a (lat, long) to a timezone.

My motivation was figuring out the UTC time of a JPG with EXIF
metadata containing GPS coordinates and local time, but no timezone
offset. This is a surprising number of photos. I built this to
improve sorting in Camlistore, especially when photos are intermixed
with tweets, checkins, etc, but it should be generally applicable.

See docs at http://godoc.org/github.com/bradfitz/latlong

It tries to have a small binary size (~360 KB), low memory footprint
(~1 MB), and incredibly fast lookups (~0.5 microseconds). It does not
try to be perfectly accurate when very close to borders.

To rebuild the data files, see the Makefile (or just run make).
You'll need the data files unzip to the "world" directory.

Some background:

https://plus.google.com/u/0/+BradFitzpatrick/posts/XVyy1bAzkZd

Another image of the underlying data structure:

http://i.imgur.com/Rt8bLSD.png

... the tile borders are only there for debugging, to show areas with
only one timezone. Tiles without borders around them still work; at
that level, the small possible bitmap is used for lookup.

Main metrics

Overview
Name With Ownerbradfitz/latlong
Primary LanguageGo
Program languageGo (Language Count: 2)
Platform
License:Apache License 2.0
所有者活动
Created At2014-07-09 05:12:16
Pushed At2023-02-17 23:46:58
Last Commit At2017-04-11 02:09:02
Release Count0
用户参与
Stargazers Count396
Watchers Count14
Fork Count43
Commits Count22
Has Issues Enabled
Issues Count6
Issue Open Count3
Pull Requests Count1
Pull Requests Open Count1
Pull Requests Close Count3
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private