Documentation ¶
Index ¶
- func CellUnionMissing(from, to s2.CellUnion) s2.CellUnion
- func CellUnionToGeoJSON(cu s2.CellUnion) []byte
- func CellUnionToTokens(cu s2.CellUnion) []string
- func CellUnionUnion(src s2.CellUnion, others ...s2.CellUnion) s2.CellUnion
- func GeoJSONToCellHandler(w http.ResponseWriter, r *http.Request)
- func ParseCellID(cs string) *s2.CellID
- func S2CellQueryHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CellUnionMissing ¶
CellUnionMissing returns cell from `from` not present in `to`
func CellUnionToGeoJSON ¶
CellUnionToGeoJSON helpers to display s2 cells on maps with GeoJSON exports cell union into its GeoJSON representation
func CellUnionToTokens ¶
CellUnionToTokens a cell union to a token string list
func CellUnionUnion ¶
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 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.