Discover Packages
github.com/weathersource/go-geo
package
module
Version:
v1.0.6
Opens a new window with list of versions in this module.
Published: Apr 1, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
go-geo
Package geo provides functions of geographic functionality.
Expand ▾
Collapse ▴
Documentation
¶
Package geo provides functions of geographic functionality.
Distance calculates distance in miles between two lat/lng values.
Distance calculates distance in miles between two lat/lng values.
ELng converts lng to a full east longitude value [0, 360)
ELng converts lng to a full east longitude value [0, 360)
EwLng converts lng to a east/west longitude value [-180, 180)
EwLng converts lng to a east/west longitude value [-180, 180)
type Poly struct {
Pts [](Pt )
}
Poly is a polygon represented by series of points. The lines of a polygon
must be non-intersecting. Every simple polygon must begin and end with the
same point. If a point is repeated, it is assumed to complete the polygon.
A complex polygon with holesand/or islands is represented by sequential
points representing complete simple polygons.
Contains performs a point-in-polygon test.
type Pt struct {
Lat, Lng float32
}
Pt is a representation of a 2D point. float32 is used to save 50% of the
space - as this can add up with large polygons.
type Pt64 struct {
Lat, Lng float64
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.