Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)",
(osmid,), cur=cur)
if routelines:
outtags['geom'] = sops.linemerge(routelines)
outtags['geom']._crs = int(conf.DB_SRID)
# Clear elevation profile cache
clearcache.clearElevationProfileCache(osmid)
return outtags
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)",
(osmid,), cur=cur)
if routelines:
outtags['geom'] = sops.linemerge(routelines)
outtags['geom']._crs = int(conf.DB_SRID)
# Clear elevation profile cache
clearcache.clearElevationProfileCache(osmid)
return outtags