How to use the tilecloud.layout.re_.RETileLayout.__init__ function in tilecloud

To help you get started, we’ve selected a few tilecloud 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 camptocamp / tilecloud / tilecloud / layout / i3d.py View on Github external
def __init__(self):
        RETileLayout.__init__(self, self.PATTERN, self.RE)
github camptocamp / tilecloud / tilecloud / layout / tilecache.py View on Github external
def __init__(self):
        RETileLayout.__init__(self, self.PATTERN, self.RE)
github camptocamp / tilecloud / tilecloud / layout / osm.py View on Github external
def __init__(self):
        RETileLayout.__init__(self, self.PATTERN, self.RE)
github camptocamp / tilecloud / tilecloud / layout / template.py View on Github external
index, patterns, filename_patterns = 0, [], []
        for match in re.finditer(r"%\(([xyz])\)d", self.template):
            prematch_pattern = re.escape(self.template[index : match.start()])
            if self.prefix is None:
                self.prefix = self.template[index : match.start()]
            patterns.append(prematch_pattern)
            patterns.append(r"\d+")
            filename_patterns.append(prematch_pattern)
            filename_patterns.append(r"(?P<{0!s}>\d+)".format(match.group(1)))
            index = match.end()
        postmatch_pattern = re.escape(self.template[index:])
        patterns.append(postmatch_pattern)
        filename_patterns.append(postmatch_pattern)
        pattern = "".join(patterns)
        filename_re = re.compile("".join(filename_patterns))
        RETileLayout.__init__(self, pattern, filename_re)