locodecolumn

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinates

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

Coordinates represents coordinates of the location from UN/LOCODE table.

func CoordinatesFromString

func CoordinatesFromString(s string) (*Coordinates, error)

CoordinatesFromString parses string and returns location's coordinates.

func (*Coordinates) Latitude

func (c *Coordinates) Latitude() *LatitudeCode

Latitude returns location's latitude.

func (*Coordinates) Longitude

func (c *Coordinates) Longitude() *LongitudeCode

Longitude returns location's longitude.

type CountryCode

type CountryCode [countryCodeLen]uint8

CountryCode represents ISO 3166 alpha-2 Country Code.

func CountryCodeFromString

func CountryCodeFromString(s string) (*CountryCode, error)

CountryCodeFromString parses string and returns country code.

func (*CountryCode) Symbols

func (cc *CountryCode) Symbols() [countryCodeLen]uint8

Symbols returns digits of the country code.

type LatitudeCode

type LatitudeCode coordinateCode

LatitudeCode represents the value of the latitude of the location conforming to UN/LOCODE specification.

func LatitudeFromString

func LatitudeFromString(s string) (*LatitudeCode, error)

LatitudeFromString parses string and returns location's latitude.

func (*LatitudeCode) Degrees

func (lc *LatitudeCode) Degrees() (l [latDegDigits]uint8)

Degrees returns latitude's degrees.

func (*LatitudeCode) Hemisphere

func (lc *LatitudeCode) Hemisphere() LatitudeHemisphere

Hemisphere returns latitude's hemisphere code.

func (*LatitudeCode) Minutes

func (lc *LatitudeCode) Minutes() [minutesDigits]uint8

Minutes returns latitude's minutes.

type LatitudeHemisphere

type LatitudeHemisphere [hemisphereSymbols]uint8

LatitudeHemisphere represents hemisphere of the earth along the equator.

func (LatitudeHemisphere) North

func (h LatitudeHemisphere) North() bool

North returns true for the northern hemisphere.

type LocationCode

type LocationCode [locationCodeLen]uint8

LocationCode represents 3-character code for the location.

func LocationCodeFromString

func LocationCodeFromString(s string) (*LocationCode, error)

LocationCodeFromString parses string and returns location code.

func (*LocationCode) Symbols

func (lc *LocationCode) Symbols() [locationCodeLen]uint8

Symbols returns characters of the location code.

type LongitudeCode

type LongitudeCode coordinateCode

LongitudeCode represents the value of the longitude of the location conforming to UN/LOCODE specification.

func LongitudeFromString

func LongitudeFromString(s string) (*LongitudeCode, error)

LongitudeFromString parses string and returns location's longitude.

func (*LongitudeCode) Degrees

func (lc *LongitudeCode) Degrees() (l [lngDegDigits]uint8)

Degrees returns longitude's degrees.

func (*LongitudeCode) Hemisphere

func (lc *LongitudeCode) Hemisphere() LongitudeHemisphere

Hemisphere returns longitude's hemisphere code.

func (*LongitudeCode) Minutes

func (lc *LongitudeCode) Minutes() [minutesDigits]uint8

Minutes returns longitude's minutes.

type LongitudeHemisphere

type LongitudeHemisphere [hemisphereSymbols]uint8

LongitudeHemisphere represents hemisphere of the earth // along the Greenwich meridian.

func (LongitudeHemisphere) East

func (h LongitudeHemisphere) East() bool

East returns true for the eastern hemisphere.

Jump to

Keyboard shortcuts

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