0

moved quadtree preprocessing out of RenderNode, fixes issue #326

This commit is contained in:
Aaron Griffith
2011-04-18 20:16:06 -04:00
parent a6e8de484d
commit 2d25d74bd7
2 changed files with 6 additions and 2 deletions

View File

@@ -227,8 +227,12 @@ def main():
else: else:
qtree = quadtree.QuadtreeGen(w, destdir, rendermode=rendermode, **qtree_args) qtree = quadtree.QuadtreeGen(w, destdir, rendermode=rendermode, **qtree_args)
q.append(qtree) q.append(qtree)
# do quadtree-level preprocessing
for qtree in q:
qtree.go(options.procs)
#create the distributed render # create the distributed render
r = rendernode.RenderNode(q) r = rendernode.RenderNode(q)
# write out the map and web assets # write out the map and web assets
@@ -238,6 +242,7 @@ def main():
# render the tiles! # render the tiles!
r.go(options.procs) r.go(options.procs)
# finish up the map
m.finalize() m.finalize()

View File

@@ -149,7 +149,6 @@ class RenderNode(object):
total += 4**q.p total += 4**q.p
if q.p > max_p: if q.p > max_p:
max_p = q.p max_p = q.p
q.go(procs)
self.max_p = max_p self.max_p = max_p
# Render the highest level of tiles from the chunks # Render the highest level of tiles from the chunks
results = collections.deque() results = collections.deque()