maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH] Importing ocitysmap elements the right way.


From: David Decotigny
Subject: [Maposmatic-dev] [PATCH] Importing ocitysmap elements the right way.
Date: Fri, 11 Sep 2009 23:53:57 +0200

The daemon needs to be updated in order to update ocitysmap the right way.
---
 scripts/maposmaticd |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/scripts/maposmaticd b/scripts/maposmaticd
index d7f36f4..25c904d 100755
--- a/scripts/maposmaticd
+++ b/scripts/maposmaticd
@@ -27,7 +27,8 @@ from datetime import datetime, timedelta
 
 from www.maposmatic.models import MapRenderingJob
 from www.settings import RENDERING_RESULT_PATH, LOG, RENDERING_RESULT_FORMATS, 
RENDERING_RESULT_MAX_SIZE_GB
-import ocitysmap
+from ocitysmap.coords import BoundingBox as OCMBoundingBox
+from ocitysmap.street_index import OCitySMap 
 import Image
 
 def handler(signum, frame, pipe_write):
@@ -37,13 +38,11 @@ def handler(signum, frame, pipe_write):
 def render_job_process(job):
 
     if job.administrative_city == "":
-        bbox = ocitysmap.coords.BoundingBox(job.lat_upper_left,
-                                            job.lon_upper_left,
-                                            job.lat_bottom_right,
-                                            job.lon_bottom_right)
-        renderer = ocitysmap.OCitySMap(boundingbox=bbox)
+        bbox = OCMBoundingBox(job.lat_upper_left, job.lon_upper_left,
+                              job.lat_bottom_right, job.lon_bottom_right)
+        renderer = OCitySMap(boundingbox=bbox)
     else:
-        renderer = ocitysmap.OCitySMap(city_name=job.administrative_city)
+        renderer = OCitySMap(city_name=job.administrative_city)
 
     outfile_prefix = os.path.join(RENDERING_RESULT_PATH, job.files_prefix())
 
-- 
1.6.0.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]