Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
The actualy rendering information is computed seperately. This allows to use
different rendering styles on the same table. For the moment there is only
style_default.py.
"""
import os.path
import shapely.ops as sops
from osgende import RelationHierarchy,RelationSegments,RelationSegmentRoutes
from osgende.common.postgisconn import PGTable
import conf
import routemap.common.symbols as symbols
symboltypes = (
symbols.ColorBoxReference,
symbols.SymbolReference,
)
class Routes(RelationSegmentRoutes):
"""Preprocessed information about the cycling routes.
It contains the following fields:
* 'name' - the default name, generally taken from name-tag
however, if the name is entirely in non-latin symbols,
name:en is prefered if existing
* 'intname' - collection of translated names
* 'symbol' - unique name of the computed shield to use
* 'country' - coutry the route is mainly in (in terms of
numbers of sections, TODO check this heuristic)
"""
import os.path
from collections import defaultdict
import osgende
import conf
import routemap.common.symbols as symbols
import shapely.ops as sops
symboltypes = (
symbols.ShieldReference,
symbols.SwissMobileReference,
symbols.JelReference,
symbols.KCTReference,
symbols.OSMCSymbolReference,
symbols.SymbolReference
)
class Routes(osgende.RelationSegmentRoutes):
"""Preprocessed information about the hiking routes.
It contains the following fields:
* 'name' - the default name, generally taken from name-tag
however, if the name is entirely in non-latin symbols,
name:en is prefered if existing
* 'intname' - collection of translated names
* 'symbol' - unique name of the computed shield to use
* 'country' - coutry the route is mainly in (in terms of
numbers of sections, TODO check this heuristic)