nycsubway

package
v0.0.0-...-04626f2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const EarthRadius = 6378.137

EarthRadius is a rough estimate of earth's radius in km at latitude 0 if earth was a perfect sphere.

Variables

View Source
var GeoJSON = make(map[string][]byte)

GeoJSON is a cache of the NYC Subway Station and Line data.

View Source
var Stations = rtree.NewTree(2, 25, 50)

Stations is an RTree housing the stations

Functions

This section is empty.

Types

type Station

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

Station is a wrapper for `*geojson.Feature` so that we can implement `rtree.Spatial` interface type.

func (*Station) Bounds

func (s *Station) Bounds() *rtree.Rect

Bounds implements `rtree.Spatial` so we can load stations into an `rtree.Rtree`.

func (*Station) Point

func (s *Station) Point() cluster.Point

Point enables clustering over `Station`s.

Jump to

Keyboard shortcuts

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