How to use the routemap.admin.countries 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 / hiking / db.py View on Github external
def create_table_objects(self):
        # stores all modified routes (no changes in guideposts or 
        # network nodes are tracked)
        self.update_table = osgende.UpdatedGeometriesTable(self.db, conf.DB_CHANGE_TABLE)
        self.update_table.srid = conf.DB_SRID

        # Country polygons
        countries = hadmin.CountryTable(self.db)

        # Route segment for the routable network
        self.segment_table = osgende.RelationSegments(self.db, 
                         conf.DB_SEGMENT_TABLE,
                         conf.TAGS_ROUTE_SUBSET,
                         country_table=countries,
                         country_column='code',
                         uptable=self.update_table)
        self.segment_table.srid = conf.DB_SRID
        self.segment_table.set_num_threads(self.options.numthreads)

        # table saving the relation between the routes
        hiertable = osgende.RelationHierarchy(self.db,
                            name=conf.DB_HIERARCHY_TABLE,
                            subset="""SELECT id FROM relations
                                      WHERE %s""" % (conf.TAGS_ROUTE_SUBSET))
github waymarkedtrails / waymarked-trails-site / db / src / routemap / admin / db.py View on Github external
def create_table_objects(self):
        # Country polygons
        countries = hadmin.CountryTable(self.db)

        self.data_tables = [
            countries,
        ]
        self.style_tables = [
        ]