geozip

package module
v0.0.0-...-470484a Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2015 License: MIT Imports: 4 Imported by: 0

README

geozipgo

A Go implementation of the Geozip algorithm described here: http://geozipcode.blogspot.nl/2015/02/geozip.html

Documentation is in the comments, but if you require beautiful colors and the in-your-face excitement of the internet, then visit http://godoc.org/github.com/nick11roberts/geozip for the CSS-y docs that you so intensely crave.

Documentation

Overview

Package geozip implements the Geozip algorithm described here: http://geozipcode.blogspot.nl/2015/02/geozip.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(bucket int64) (float64, float64, bool)

Decode is the inverse operation of Encode. Decode returns latitude, longitude, and whether or not they are both represented precisely as float64 types.

func Encode

func Encode(latitude, longitude float64, validate bool, precision int) int64

Encode generates a geozip bucket id for a given latitude and longitude. Argument validate is true if a validation is to be performed. Precision is a number in the range of [0, 18] such that 0 gives lowest precision (000000000000000000) and 18 gives the most precise bucket id.

func Valid

func Valid(latitude, longitude float64) bool

Valid returns true if latitude is in the range of [-90, 90] and longtitude is in the range of [-180, 180].

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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