Added new path type: recommendedcarroute
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Wed, 13 Feb 2013 22:14:10 +0000 (22:14 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Wed, 13 Feb 2013 22:14:10 +0000 (22:14 +0000)
Released version 0.0.22.

git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@1276 7aebc617-e5e2-0310-91dc-80fb5f6d2477

setup.py
wrpylib/wrmwcache.py

index f83fbf7790f5faa5229d06feddc8c5973cd7f461..aefeb98b5e3602e113d1af8c66d52d5512ef599c 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 from setuptools import setup
 
 setup(name='wrpylib',
 from setuptools import setup
 
 setup(name='wrpylib',
-    version='0.0.21',
+    version='0.0.22',
     description='Winterrodeln Python Library',
     author='Philipp Spitzer',
     author_email='philipp.spitzer@winterrodeln.org',
     description='Winterrodeln Python Library',
     author='Philipp Spitzer',
     author_email='philipp.spitzer@winterrodeln.org',
index d8c2caec738ee33a5c254f61002a98b91b37aa35..319a0a137ca354f576819b4aa64761c86676b4cc 100644 (file)
@@ -187,11 +187,12 @@ def update_wrmapcache(connection):
                 # Paths
                 for path_type, coords in paths:
                     path_type = path_type.lower()
                 # Paths
                 for path_type, coords in paths:
                     path_type = path_type.lower()
-                    path_types = {u'6#ff014e9a': u'sledrun', u'6#ffe98401': u'walkup', u'6#ff7f7fff': u'alternative', u'3#ff000000': u'lift'}
+                    path_types = {u'6#ff014e9a': u'sledrun', u'6#ffe98401': u'walkup', u'6#ff7f7fff': u'alternative', u'3#ff000000': u'lift', u'3#ffe1e100': u'recommendedcarroute'}
                     if not path_types.has_key(path_type): raise RuntimeError(u'Unknown path type {0}'.format(path_type))
                     path_type = path_types[path_type]
                     path = u", ".join(["{0} {1}".format(lon, lat) for lon, lat, symbol, title in coords])
                     path = u'LineString({0})'.format(path)
                     if not path_types.has_key(path_type): raise RuntimeError(u'Unknown path type {0}'.format(path_type))
                     path_type = path_types[path_type]
                     path = u", ".join(["{0} {1}".format(lon, lat) for lon, lat, symbol, title in coords])
                     path = u'LineString({0})'.format(path)
+                    if path_type == u'recommendedcarroute': continue
                     sql = u'insert into wrmappathcache (path, page_id, type) values (GeomFromText(%s), %s, %s)'
                     connection.execute(sql, (path, sledrun_page.page_id, path_type))
         except RuntimeError as e:
                     sql = u'insert into wrmappathcache (path, page_id, type) values (GeomFromText(%s), %s, %s)'
                     connection.execute(sql, (path, sledrun_page.page_id, path_type))
         except RuntimeError as e: