Documentation ¶
Overview ¶
Package geo provides types and functions for geospatial reasoning and indexing purposes.
Index ¶
Constants ¶
View Source
const ( // DefaultMinimumCellLevel is the default minimum cell level, chosen such // that the minimum cell size is ~1km^2. DefaultMinimumCellLevel = 13 // DefaultMaximumCellLevel is the default minimum cell level, chosen such // that the maximum cell size is ~1km^2. DefaultMaximumCellLevel = 13 )
Variables ¶
View Source
var (
// RegionCoverer provides an overridable interface to defaultRegionCoverer
RegionCoverer = defaultRegionCoverer
)
Functions ¶
func AreaToCellIDs ¶
AreaToCellIDs parses "area" in the format 'lat0,lon0,lat1,lon1,...' and returns the resulting s2.CellUnion.
TODO(tvoss):
- Agree and implement a maximum number of points in area
func Covering ¶
Covering calculates the S2 covering of a set of S2 points. Will try the loop in both clockwise and counter clockwise.
func CoveringForLoop ¶
CoveringForLoop calculates an s2 cell covering for loop or returns an area if the area covered by loop is too large.
func DistanceMetersToAngle ¶
DistanceMetersToAngle converts distance in [m] to an s1.Angle in radians.
Types ¶
type ErrAreaTooLarge ¶
type ErrAreaTooLarge struct {
// contains filtered or unexported fields
}
ErrAreaTooLarge is the error passed back when the requested Area is larger than maxAllowedAreaKm2
func (*ErrAreaTooLarge) Error ¶
func (e *ErrAreaTooLarge) Error() string
Error returns the error message for ErrAreaTooLarge.
Click to show internal directories.
Click to hide internal directories.