mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-12-30 19:25:43 +01:00
Added som broken pyramid generation code.
This commit is contained in:
@@ -20,6 +20,7 @@ func main() {
|
||||
outDir string
|
||||
numWorkers int
|
||||
skipBaseLevel bool
|
||||
skipPyramid bool
|
||||
)
|
||||
|
||||
flag.IntVar(&port, "port", 6379, "port to of mtredisalize server")
|
||||
@@ -34,8 +35,10 @@ func main() {
|
||||
flag.StringVar(&outDir, "o", "map", "directory with the resulting image tree")
|
||||
flag.IntVar(&numWorkers, "worker", 1, "number of workers")
|
||||
flag.IntVar(&numWorkers, "w", 1, "number of workers (shorthand)")
|
||||
flag.BoolVar(&skipBaseLevel, "skip-base-level", false, "Do not generate baselevel")
|
||||
flag.BoolVar(&skipBaseLevel, "sb", false, "Do not generate baselevel (shorthand)")
|
||||
flag.BoolVar(&skipBaseLevel, "skip-base-level", false, "Do not generate base level tiles")
|
||||
flag.BoolVar(&skipBaseLevel, "sb", false, "Do not generate base level tiles (shorthand)")
|
||||
flag.BoolVar(&skipPyramid, "skip-pyramid", false, "Do not generate pyramid tiles")
|
||||
flag.BoolVar(&skipPyramid, "sp", false, "Do not generate pyramid tiles (shorthand)")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
@@ -44,7 +47,12 @@ func main() {
|
||||
address := fmt.Sprintf("%s:%d", host, port)
|
||||
if err = createBaseLevel(
|
||||
address, xMin, zMin, xMax, zMax, colorsFile, outDir, numWorkers); err != nil {
|
||||
log.Fatalf("Creating base level failed: %s", err)
|
||||
log.Fatalf("Creating base level tiles failed: %s", err)
|
||||
}
|
||||
}
|
||||
if !skipPyramid {
|
||||
if err = createPyramid(outDir, numWorkers); err != nil {
|
||||
log.Fatalf("Creating pyramid tiles failed: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user