• Stars
    star
    374
  • Rank 114,346 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 10 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The latlong package maps from a latitude and longitude to a timezone.
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.

More Repositories

1

homelab

Brad's homelab setup
1,859
star
2

http2

old repo for HTTP/2 support for Go (see README for new home)
Go
1,721
star
3

gomemcache

Go Memcached client library #golang
Go
1,638
star
4

goimports

(old repo) Tool to fix (add, remove) your Go imports automatically.
Go
1,031
star
5

talk-yapc-asia-2015

talk-yapc-asia-2015
Go
709
star
6

shotizam

Shotizam analyzes the size of Go binaries
Go
577
star
7

exp-httpclient

experimental new HTTP client API for #golang (WIP)
Go
576
star
8

embiggen-disk

embiggden-disk live-resizes a filesystem after first live-resizing any necessary layers below it: an optional LVM LV and PV, and an MBR or GPT partition table
Go
469
star
9

gitbrute

brute-force a git commit hash
Go
375
star
10

iter

Range over integers [0,n). Seriously, that's it.
Go
293
star
11

jndi

a irresponsibly bad logging library
Go
265
star
12

autocertdelegate

Get LetsEncrypt TLS certs for internal-only TLS servers via a delegated golang.org/x/crypto/acme/autocert server.
Go
243
star
13

runsit

THIS IS OLD. DO NOT USE THIS. Just use systemd these days.
Go
217
star
14

go-smtpd

SMTP server library for Go
Go
209
star
15

scanningcabinet

Document Management System (scanner -> appengine blobs)
Python
144
star
16

campher

Embed Perl in Go. This works, but was a joke for a presentation. Don't use.
Go
134
star
17

go-sql-test

test ALL the databases
Go
131
star
18

websomtep

[joke] combination SMTP / WebSocket server
Go
125
star
19

deadbeef

Gimmicky commit hash made using bradfitz/gitbrute
111
star
20

slice

The slice package sorts Go slices.
Go
111
star
21

snake

a #golang Snake game in webassembly running at http://snake.126.49.198.in-addr.arpa/
Go
96
star
22

webfist

WebFist implements WebFinger delegation for providers who don't support WebFinger natively.
Go
84
star
23

android-garage-opener

Android Garage Door Opener
Java
82
star
24

lesser

Go
79
star
25

rfbgo

Toy RFB (VNC) Server in Go (#golang)
Go
73
star
26

go-tool-cache

Go
59
star
27

inboxfewer

archive gmail threads when github or gerrit issues are closed
Go
56
star
28

art

Allotment Routing Table
Go
56
star
29

shipit

Software Release Tool
Perl
55
star
30

gitutil

Utilities for working with git and Gerrit
Go
49
star
31

contributing

(DEAD, SHUT DOWN) a repository of information on how to contribute to open source projects
Python
45
star
32

android-squeezer

Android SqueezeCenter / SqueezeBox remote control client.
Java
35
star
33

undent

unindent stuff
Go
35
star
34

h2slam

slam an HTTP/2 server a lot of concurrent load over a single TCP connection (for debugging something)
Go
28
star
35

zippy-android-talk

Code to accompany my Zippy Android talk at Google I/O 2010
Java
27
star
36

go-issue-mirror

[old] precursor to golang.org/x/build/maintner/godata
24
star
37

goman

Gearman Client for Go
Go
24
star
38

minimal-qemu-linux

experimenting with a minimal Linux kernel under qemu-system for testing
Go
20
star
39

litecmp

Go
19
star
40

ip2asn

parser for iptoasn.com data
Go
18
star
41

hubbub-hub

A PubSubHubbub hub implementation
Perl
18
star
42

sixmap

tool to visualize the SIX (Seattle Internet Exchange) route server coverage
Go
17
star
43

qopher

Gopher Queue
Go
17
star
44

gotsync

parallel tree sync
Go
15
star
45

qemu-guest-kragent

a minimal qemu-guest-agent in Go for gokrazy + Proxmox (qemu)
Go
15
star
46

powerview

Control Hunter Douglas PowerView shades & blinds
Go
14
star
47

grpc-go16-demo

Demonstrating using Go 1.6's http2 to do grpc
Protocol Buffer
14
star
48

go-get-proxy

http proxy for the "go get" subcommand
Go
13
star
49

gce

Go package for for Google Compute Engine (GCE)
Go
13
star
50

sonden

If Sonos is playing audio, turn on my Denon amps.
Go
12
star
51

go-runas

Wrapper around go's rpc pkg to drop root and run RPCs as another user
Go
12
star
52

talk-http2go

HTTP/2 Go Talk
Go
11
star
53

candysim

when will Candyland be over?
Go
11
star
54

morskoyboy

Bored on a bus with no Internet? Play ะœะพั€ัะบะพะน ะ‘ะพะน (Sea Battle), similar to Battleship.
Go
10
star
55

batt

build ALL the things
Go
7
star
56

set-consistenthash-perl

consistent hashing library for Perl
Perl
7
star
57

issue-tracker-behaviors

7
star
58

lingobingo

lingo bingo lightning talk
Go
7
star
59

brackup-gae-server

Brackup server for Google App Engine
Python
6
star
60

eight22er

[joke] Twitter Direct Message POP3 gateway
Go
6
star
61

remserial-mirror

git mirror of remserial
C
5
star
62

talk-2016-08-16-seattle-go-1.7

Go
5
star
63

aoc

advent of code helpers to reuse between tasks
Go
5
star
64

perl-denon-avr-4806

Perl code to control a Denon AVR-4806
4
star
65

unicode-checkutf8

Perl module Unicode::CheckUTF8
Perl
4
star
66

go-mod-archiver-test

Go
4
star
67

perl-net-openid

Perl Net::OpenID::* modules
4
star
68

issuemirror

Code for mirroring Github issues to local files, and reading them.
Go
4
star
69

issue735583

Demo for Chrome issue issue 735583
Go
3
star
70

talk-2014-04-gophercon

Gophercon 2014 Talk
Go
3
star
71

sys-syscall

Sys::Syscall -- access system calls that Perl doesn't normally provide access to
Perl
3
star
72

k9sms

K-9 SMS
3
star
73

barlogalights

little program I use to run the LED strips in my home bar
Go
3
star
74

talk-2012-08-23-square-go

Talk about Go at Square
JavaScript
2
star
75

fotobilder-spiegel

Mirror photos & galleries from FotoBilder / LiveJournal
Go
2
star
76

democgoalloc

Go
2
star
77

fw-test-agent

Go
1
star
78

go-test-bug-repro

Go
1
star
79

wintun-go

dev fork of golang.zx2c4.com/wintun
Go
1
star
80

talk-gluecon-2010

Slides & code samples from my Gluecon 2010 talk
Perl
1
star