mirror of https://github.com/tidwall/tile38.git
18 lines
345 B
Go
18 lines
345 B
Go
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)
|
|
}
|