Skip to content

Commit

Permalink
谷歌国内影像不能用了,
Browse files Browse the repository at this point in the history
更新影像地址
更新输出格式
  • Loading branch information
atlasdatatech committed Jan 14, 2021
1 parent 3bc3e57 commit 6d3a203
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
directory ="output"
[task]
#number of fetchers
workers = 100
workers = 64
#number of savers
savepipe = 1
savepipe = 4

[tm]
#name for mbtiles
name = "streets-v8"
name = "google satelite"
#max and min level for mbtiles
min = 0
max = 3
Expand All @@ -27,7 +27,7 @@
#url is the schema url of tiles
# url= "https://api.mapbox.com/v4/mapbox.mapbox-streets-v8/{z}/{x}/{y}.vector.pbf?sku=1016gFniej06a&access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA"
# url= "https://api.mapbox.com/v4/mapbox.mapbox-terrain-v2/{z}/{x}/{y}.vector.pbf?sku=1016gFniej06a&access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA"
url = "http://mt0.google.cn/vt/lyrs=s&x={x}&y={y}&z={z}"
url = "http://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"
#lrs can set diff boundaries for diff levels
[[lrs]]
min = 0
Expand Down
7 changes: 3 additions & 4 deletions task.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ func (task *Task) tileFetcher(t maptile.Tile, url string) {
task.saveTile(tile)
}
secs := time.Since(start).Seconds()
fmt.Printf("\ntile %v, %.3fs, %.2f kb, %s ...\n", t, secs, float32(len(body))/1024.0, pbf)
fmt.Printf("tile(z:%d, x:%d, y:%d), %.3fs, %.2f kb, %s ...\n", t.Z, t.X, t.Y, secs, float32(len(body))/1024.0, pbf)
}

//DownloadZoom 下载指定层级
func (task *Task) downloadLayer(layer Layer) {
bar := pb.New64(layer.Count).Prefix(fmt.Sprintf("Zoom %d : ", layer.Zoom))
bar := pb.New64(layer.Count).Prefix(fmt.Sprintf("Zoom %d : ", layer.Zoom)).Postfix("\n")
// bar.SetRefreshRate(time.Second)
bar.Start()
// bar.SetMaxWidth(300)
Expand Down Expand Up @@ -371,8 +371,7 @@ func (task *Task) downloadGeom(geom orb.Geometry, zoom int) {
//Download 开启下载任务
func (task *Task) Download() {
//g orb.Geometry, minz int, maxz int
task.Bar = pb.New64(task.Total).Prefix("Task : ")
//.Postfix("\n")
task.Bar = pb.New64(task.Total).Prefix("Task : ").Postfix("\n")
// task.Bar.SetRefreshRate(10 * time.Second)
// task.Bar.Format("<.- >")
task.Bar.Start()
Expand Down

0 comments on commit 6d3a203

Please sign in to comment.