Fixed "typo": tes_GermanTristateFloat -> test_GermanTristateFloat.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrmwcache.py
index 7966c56f892359333b22ecd445b675fd5f581aab..319a0a137ca354f576819b4aa64761c86676b4cc 100644 (file)
@@ -19,6 +19,7 @@ def update_wrsledruncache(connection):
     
     >>> from sqlalchemy.engine import create_engine
     >>> engine = create_engine('mysql://philipp@localhost:3306/philipp_winterrodeln_wiki?charset=utf8&use_unicode=0')
+    >>> # see: https://sourceforge.net/tracker/?func=detail&aid=2837134&group_id=22307&atid=374932
     >>> update_wrsledruncache(engine.connect())
     """
     metadata = schema.MetaData()
@@ -61,6 +62,7 @@ def update_wrinncache(connection):
     
     >>> from sqlalchemy.engine import create_engine
     >>> engine = create_engine('mysql://philipp@localhost:3306/philipp_winterrodeln_wiki?charset=utf8&use_unicode=0')
+    >>> # see: https://sourceforge.net/tracker/?func=detail&aid=2837134&group_id=22307&atid=374932
     >>> update_wrinncache(engine.connect())
     """
     metadata = schema.MetaData()
@@ -103,6 +105,7 @@ def update_wrreportcache(connection, page_id=None):
 
     >>> from sqlalchemy.engine import create_engine
     >>> engine = create_engine('mysql://philipp@localhost:3306/philipp_winterrodeln_wiki?charset=utf8&use_unicode=1')
+    >>> # see: https://sourceforge.net/tracker/?func=detail&aid=2837134&group_id=22307&atid=374932
     >>> update_wrreportcache(engine.connect())
     """
     metadata = schema.MetaData()
@@ -143,6 +146,7 @@ def update_wrmapcache(connection):
     >>> from sqlalchemy.engine import create_engine
     >>> engine = create_engine('mysql://philipp@localhost:3306/philipp_winterrodeln_wiki?charset=utf8&use_unicode=0')
     >>> # or: engine = create_engine('mysql://philipp@localhost:3306/philipp_winterrodeln_wiki?charset=utf8&use_unicode=0&passwd=XXXXX')
+    >>> # see: https://sourceforge.net/tracker/?func=detail&aid=2837134&group_id=22307&atid=374932
     >>> connection = engine.connect()
     >>> update_wrmapcache(connection)
     """
@@ -183,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: