latlong

package module
v0.0.0-...-e026e7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

README

This is a Go package which maps a (lat, long) to a timezone which forked from bradfitz/latlong.

Since the data source tz_world.zip is no longer maintained, we use another OSM-based map timezone-boundary-builder instead.

The z_gen_tables.go was generated by 2018d release timezones.shapefile.zip.

Documentation

Overview

Package latlong maps from a latitude and longitude to a timezone.

It uses the data from http://efele.net/maps/tz/world/ compressed down to an internal form optimized for low memory overhead and fast lookups at the expense of perfect accuracy when close to borders. The data files are compiled in to this package and do not require explicit loading.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupZoneName

func LookupZoneName(lat, long float64) string

LookupZoneName returns the timezone name at the given latitude and longitude. The returned name is either the empty string (if not found) or a name suitable for passing to time.LoadLocation. For example, "America/New_York".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL