Release of version 0.1.0.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrmwcache.py
index d8c2caec738ee33a5c254f61002a98b91b37aa35..d9da56fbaf351c908b33328b4b0436f3fe83c926 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
 # -*- coding: iso-8859-15 -*-
 # $Id$
 # $HeadURL$
@@ -187,11 +187,12 @@ def update_wrmapcache(connection):
                 # 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 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: