How to use the routemap.common.clearcache.clearElevationProfileCache function in routemap

To help you get started, we’ve selected a few routemap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github waymarkedtrails / waymarked-trails-site / db / src / routemap / riding / relations.py View on Github external
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
github waymarkedtrails / waymarked-trails-site / db / src / routemap / slopemap / relations.py View on Github external
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