コード例 #1
0
ファイル: template.py プロジェクト: fredj/tilecloud
 def __init__(self, template):
     self.template = template
     index, patterns, filename_patterns = 0, [], []
     for match in re.finditer(r'%\(([xyz])\)d', self.template):
         prematch_pattern = re.escape(self.template[index:match.start()])
         patterns.append(prematch_pattern)
         patterns.append(r'\d+')
         filename_patterns.append(prematch_pattern)
         filename_patterns.append(r'(?P<%s>\d+)' % 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)
コード例 #2
0
ファイル: template.py プロジェクト: fredj/tilecloud
 def __init__(self, template):
     self.template = template
     index, patterns, filename_patterns = 0, [], []
     for match in re.finditer(r'%\(([xyz])\)d', self.template):
         prematch_pattern = re.escape(self.template[index:match.start()])
         patterns.append(prematch_pattern)
         patterns.append(r'\d+')
         filename_patterns.append(prematch_pattern)
         filename_patterns.append(r'(?P<%s>\d+)' % 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)
コード例 #3
0
ファイル: template.py プロジェクト: wendymhelson/tilecloud
 def __init__(self, template):
     self.template = template
     self.prefix = None
     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)
コード例 #4
0
ファイル: i3d.py プロジェクト: camptocamp/tilecloud
 def __init__(self) -> None:
     RETileLayout.__init__(self, self.PATTERN, self.RE)
コード例 #5
0
ファイル: tilecache.py プロジェクト: Web5design/tilecloud
 def __init__(self):
     RETileLayout.__init__(self, self.PATTERN, self.RE)