Documentation
¶
Index ¶
- Constants
- func CoverPoint(p Point, maxLevel int) (s2.Cell, string, [][][]float64)
- func CoverPolygon(p *s2.Polygon, maxLevel, minLevel int) (s2.CellUnion, []string, [][][]float64)
- func DecodeGeoJSON(json []byte) ([]*geojson.Feature, error)
- func EdgesOfCell(c s2.Cell) [][]float64
- func PointsToPolygon(points [][]float64) *s2.Polygon
- type Point
Constants ¶
View Source
const (
//EarthRadius the radius of earth in kilometers
EarthRadius = 6371.01
)
Variables ¶
This section is empty.
Functions ¶
func CoverPoint ¶
CoverPoint converts a point to cell based on given level
func CoverPolygon ¶
CoverPolygon converts s2 polygon to cell union and returns the respective cells
func DecodeGeoJSON ¶
DecodeGeoJSON decodes a feature collection
func PointsToPolygon ¶
PointsToPolygon converts points to s2 polygon
Types ¶
Click to show internal directories.
Click to hide internal directories.