locodecolumn

package
v0.38.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 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 the coordinates of the location from UN/LOCODE table.

func CoordinatesFromString

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

CoordinatesFromString parses a string and returns the location's coordinates.

func (*Coordinates) Latitude

func (c *Coordinates) Latitude() *LatitudeCode

Latitude returns the location's latitude.

func (*Coordinates) Longitude

func (c *Coordinates) Longitude() *LongitudeCode

Longitude returns the 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 a string and returns the 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 a string and returns the location's latitude.

func (*LatitudeCode) Degrees

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

Degrees returns the latitude's degrees.

func (*LatitudeCode) Hemisphere

func (lc *LatitudeCode) Hemisphere() LatitudeHemisphere

Hemisphere returns the latitude's hemisphere code.

func (*LatitudeCode) Minutes

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

Minutes returns the latitude's minutes.

type LatitudeHemisphere

type LatitudeHemisphere [hemisphereSymbols]uint8

LatitudeHemisphere represents the 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 a string and returns the 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 a string and returns the location's longitude.

func (*LongitudeCode) Degrees

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

Degrees returns the longitude's degrees.

func (*LongitudeCode) Hemisphere

func (lc *LongitudeCode) Hemisphere() LongitudeHemisphere

Hemisphere returns the longitude's hemisphere code.

func (*LongitudeCode) Minutes

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

Minutes returns the longitude's minutes.

type LongitudeHemisphere

type LongitudeHemisphere [hemisphereSymbols]uint8

LongitudeHemisphere represents the 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