zipcode

package
v0.0.0-...-052fa94 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

README

Package cloudeng.io/geospatial/zipcode

import cloudeng.io/geospatial/zipcode

Zipcode lookups using data from www.geonames.org.

Types

Type DB
type DB struct {
	// contains filtered or unexported fields
}
Functions
func NewDB() *DB
Methods
func (zdb *DB) LatLong(admin, postal string) (LatLong, bool)

LatLong returns the latitude and longitude for the specified postal code and admin code (eg. AK 99553). GB and CA postal codes come in two formats, either the short form or long form:

GB: Eng BN91, or Eng "BN91 9AA".
CA: AB T0A, or AB "T0A 0A0".
func (zdb *DB) Load(data []byte, _ ...Option) error
Type LatLong
type LatLong struct {
	Lat  float64 // Estimated latitude (wgs84)
	Long float64 // Estimated longitude (wgs84)
}
Type Option
type Option func(o *options)
Functions
func WithTag(tag string) Option

Documentation

Overview

Zipcode lookups using data from www.geonames.org.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB() *DB

func (*DB) LatLong

func (zdb *DB) LatLong(admin, postal string) (LatLong, bool)

LatLong returns the latitude and longitude for the specified postal code and admin code (eg. AK 99553). GB and CA postal codes come in two formats, either the short form or long form:

GB: Eng BN91, or Eng "BN91 9AA".
CA: AB T0A, or AB "T0A 0A0".

func (*DB) Load

func (zdb *DB) Load(data []byte, _ ...Option) error

type LatLong

type LatLong struct {
	Lat  float64 // Estimated latitude (wgs84)
	Long float64 // Estimated longitude (wgs84)
}

type Option

type Option func(o *options)

func WithTag

func WithTag(tag string) Option

Jump to

Keyboard shortcuts

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