Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'top' : None}
# default treatment of tags
for (k,v) in tags.iteritems():
if k == 'name':
outtags[k] = v
elif k.startswith('name:'):
outtags['intnames'][k[5:]] = v
elif k == 'ref':
if 'name' not in outtags:
outtags['name'] = '[%s]' % v
elif k == 'network':
outtags['level'] = conf.TAGS_NETWORK_MAP.get(v, 25)
outtags['symbol'] = symbols.get_symbol(outtags['level'], None, tags, symboltypes)
cur = self.thread.cursor
if 'name' not in outtags:
outtags['name'] = '(%s)' % osmid
if outtags['top'] is None:
if 'network' in tags:
top = self.db.select_one("EXECUTE get_route_top(%s, %s)",
(osmid, tags['network']), cur=cur)
outtags['top'] = (top is None)
else:
outtags['top'] = True
# finally: compute the geometry
routelines = self.db.select_column("EXECUTE get_route_geometry(%s)",
outtags['name'] = '(%s)' % osmid
# default treatment of tags
for (k,v) in tags.iteritems():
if k == 'piste:difficulty':
if v in conf.TAGS_DIFFICULTY_MAP.keys():
outtags[v] = True
difficulty = conf.TAGS_DIFFICULTY_MAP[v]
if k == 'piste:type':
if v in conf.TAGS_PISTETYPE_MAP.keys():
outtags[v] = True
if k.startswith('name:'):
outtags['intnames'][k[5:]] = v
outtags['symbol'] = symbols.get_symbol(difficulty, None, tags, symboltypes)
cur = self.thread.cursor
if 'name' not in outtags:
outtags['name'] = '(%s)' % osmid
if outtags['top'] is None:
if 'network' in tags:
top = self.db.select_one("EXECUTE get_route_top(%s, %s)",
(osmid, tags['network']), cur=cur)
outtags['top'] = True if (top == 0) else False
else:
outtags['top'] = True
# finally: compute the geometry
routelines = self.db.select_column("EXECUTE get_route_geometry(%s)",
'top' : None}
# default treatment of tags
for (k,v) in tags.iteritems():
if k == 'name':
outtags[k] = v
elif k.startswith('name:'):
outtags['intnames'][k[5:]] = v
elif k == 'ref':
if 'name' not in outtags:
outtags['name'] = '[%s]' % v
elif k == 'network':
outtags['level'] = conf.TAGS_NETWORK_MAP.get(v, 25)
outtags['symbol'] = symbols.get_symbol(outtags['level'], None, tags, symboltypes)
cur = self.thread.cursor
if 'name' not in outtags:
outtags['name'] = '(%s)' % osmid
if outtags['top'] is None:
if 'network' in tags:
top = self.db.select_one("EXECUTE get_route_top(%s, %s)",
(osmid, tags['network']), cur=cur)
outtags['top'] = True if (top == 0) else False
else:
outtags['top'] = True
# finally: compute the geometry
routelines = self.db.select_column("EXECUTE get_route_geometry(%s)",
if ot.startswith('yellow:'):
outtags['network'] = 'CH'
outtags['level'] = 31
if ot.startswith('red:'):
outtags['network'] = 'CH'
outtags['level'] = 32
if ot.startswith('blue:'):
outtags['network'] = 'CH'
outtags['level'] = 33
# Fränkischer Albverein (around Nürnberg)
# too extensive regional network, so we need to downgrade later
if tags.get('operator') == u'Fränkischer Albverein':
outtags['network'] = 'FA'
outtags['symbol'] = symbols.get_symbol(outtags['level'], cntry, tags, symboltypes)
outtags['country'] = cntry
if 'name'not in outtags:
outtags['name'] = '(%s)' % osmid
if outtags['top'] is None:
if 'network' in tags:
top = self.db.select_one("EXECUTE get_route_top(%s, %s)",
(osmid, tags['network']), cur=cur)
outtags['top'] = (top is None)
else:
outtags['top'] = True
return outtags
'top' : None}
# default treatment of tags
for (k,v) in tags.iteritems():
if k == 'name':
outtags[k] = v
elif k.startswith('name:'):
outtags['intnames'][k[5:]] = v
elif k == 'ref':
if 'name' not in outtags:
outtags['name'] = '[%s]' % v
elif k == 'network':
outtags['level'] = conf.TAGS_NETWORK_MAP.get(v, 35)
outtags['symbol'] = symbols.get_symbol(outtags['level'], None, tags, symboltypes)
cur = self.thread.cursor
if 'name' not in outtags:
outtags['name'] = '(%s)' % osmid
if outtags['top'] is None:
if 'network' in tags:
top = self.db.select_one("EXECUTE get_route_top(%s, %s)",
(osmid, tags['network']), cur=cur)
outtags['top'] = True if (top == 0) else False
else:
outtags['top'] = True
# finally: compute the geometry
routelines = self.db.select_column("EXECUTE get_route_geometry(%s)",
'top' : None}
# default treatment of tags
for (k,v) in tags.iteritems():
if k == 'name':
outtags[k] = v
elif k.startswith('name:'):
outtags['intnames'][k[5:]] = v
elif k == 'ref':
if 'name' not in outtags:
outtags['name'] = '[%s]' % v
elif k == 'network':
outtags['level'] = conf.TAGS_NETWORK_MAP.get(v, 25)
outtags['symbol'] = symbols.get_symbol(outtags['level'], None, tags, symboltypes)
cur = self.thread.cursor
if 'name' not in outtags:
outtags['name'] = '(%s)' % osmid
if outtags['top'] is None:
if 'network' in tags:
top = self.db.select_one("EXECUTE get_route_top(%s, %s)",
(osmid, tags['network']), cur=cur)
outtags['top'] = True if (top == 0) else False
else:
outtags['top'] = True
# finally: compute the geometry
routelines = self.db.select_column("EXECUTE get_route_geometry(%s)",
else:
outtags['name'] = '(%s)' % osmid
for (k,v) in tags.iteritems():
if k == 'piste:difficulty':
if v in conf.TAGS_DIFFICULTY_MAP.keys():
outtags[v] = True
difficulty = conf.TAGS_DIFFICULTY_MAP[v]
if k == 'piste:type':
if v in conf.TAGS_PISTETYPE_MAP.keys():
outtags[v] = True
if k.startswith('piste:name:'):
outtags['intnames'][k[11:]] = v
outtags['symbol'] = symbols.get_symbol(difficulty, None, tags, symboltypes)
return outtags