s2tools

package
v0.0.0-...-f4e3eaa Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CellUnionMissing

func CellUnionMissing(from, to s2.CellUnion) s2.CellUnion

CellUnionMissing returns cell from `from` not present in `to`

func CellUnionToGeoJSON

func CellUnionToGeoJSON(cu s2.CellUnion) []byte

CellUnionToGeoJSON helpers to display s2 cells on maps with GeoJSON exports cell union into its GeoJSON representation

func CellUnionToTokens

func CellUnionToTokens(cu s2.CellUnion) []string

CellUnionToTokens a cell union to a token string list

func CellUnionUnion

func CellUnionUnion(src s2.CellUnion, others ...s2.CellUnion) s2.CellUnion

CellUnionUnion Union of CellUnion Note that this is note the same as a normalized CellUnion even if some cells can be merged by parent we return all the cells as the original level

func GeoJSONToCellHandler

func GeoJSONToCellHandler(w http.ResponseWriter, r *http.Request)

GeoJSONToCellHandler expect GeoJSON POST at a given URL: /{min_level:[0-9]+}/{max_level:[0-9]+}/{max_cells:[0-9]+}/ GeoJSON as body, with only one feature inside the file curl --data "@test.geojson" http://localhost:8000/api/geojson/4/10/0 -X POST

func ParseCellID

func ParseCellID(cs string) *s2.CellID

func S2CellQueryHandler

func S2CellQueryHandler(w http.ResponseWriter, r *http.Request)

S2CellQueryHandler returns a GeoJSON containing the cells passed in the query ?cells=TokenID,...

Types

This section is empty.

Jump to

Keyboard shortcuts

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