tile38/vendor/github.com/tidwall/boxtree/res/cities/main.go

18 lines
345 B
Go
Raw Normal View History

2018-08-03 05:57:11 +03:00
package main
import (
"io/ioutil"
"github.com/tidwall/boxtree"
"github.com/tidwall/boxtree/res/tools"
"github.com/tidwall/cities"
)
func main() {
tr := boxtree.New(2)
for _, city := range cities.Cities {
tr.Insert([]float64{city.Longitude, city.Latitude}, nil, &city)
}
ioutil.WriteFile("cities.svg", []byte(tools.SVG(tr)), 0600)
}