diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-08-11 13:08:29 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:00:41 +0300 |
commit | 2e76742d8b0a57c9aaebd6ff8f5ccc8b21125b92 (patch) | |
tree | 5676737414ef689f921d95f5cd21dc3db0f366c5 /tools | |
parent | 20fed0c0c4eb78e994392b340da373660457df14 (diff) |
Removed unused get_interesting_tags
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kothic/mapcss/Condition.py | 5 | ||||
-rw-r--r-- | tools/kothic/mapcss/Rule.py | 13 | ||||
-rw-r--r-- | tools/kothic/mapcss/StyleChooser.py | 15 | ||||
-rw-r--r-- | tools/kothic/mapcss/__init__.py | 9 |
4 files changed, 0 insertions, 42 deletions
diff --git a/tools/kothic/mapcss/Condition.py b/tools/kothic/mapcss/Condition.py index 6ef03b67c2..768919dcbe 100644 --- a/tools/kothic/mapcss/Condition.py +++ b/tools/kothic/mapcss/Condition.py @@ -103,11 +103,6 @@ class Condition: self.regex = re.compile(self.params[0], re.I) self.compiled_regex = "" - def get_interesting_tags(self): - if self.params[0][:2] == "::": - return [] - return set([self.params[0]]) - def extract_tags(self): if self.params[0][:2] == "::" or self.type == "regex": return set(["*"]) # unknown diff --git a/tools/kothic/mapcss/Rule.py b/tools/kothic/mapcss/Rule.py index a4cf8d4d35..9c8cf3856a 100644 --- a/tools/kothic/mapcss/Rule.py +++ b/tools/kothic/mapcss/Rule.py @@ -58,19 +58,6 @@ class Rule(): def get_compatible_types(self): return type_matches.get(self.subject, (self.subject,)) - def get_interesting_tags(self, obj, zoom): - if obj: - if (self.subject != '') and not _test_feature_compatibility(obj, self.subject, {}): - return set() - - if zoom and not self.test_zoom(zoom): - return set() - - a = set() - for condition in self.conditions: - a.update(condition.get_interesting_tags()) - return a - def extract_tags(self): a = set() for condition in self.conditions: diff --git a/tools/kothic/mapcss/StyleChooser.py b/tools/kothic/mapcss/StyleChooser.py index f585f7ba09..77e8d6cbbf 100644 --- a/tools/kothic/mapcss/StyleChooser.py +++ b/tools/kothic/mapcss/StyleChooser.py @@ -88,21 +88,6 @@ class StyleChooser: self.compatible_types = set() self.has_evals = False - def get_interesting_tags(self, ztype, zoom): - """ - Returns a set of tags that were used in here. - """ - ### FIXME - a = set() - for r in self.ruleChains: - a.update(r.get_interesting_tags(ztype, zoom)) - if a: # FIXME: semi-illegal optimization, may wreck in future on tagless matches - for r in self.styles: - for c, b in r.iteritems(): - if type(b) == self.eval_type: - a.update(b.extract_tags()) - return a - def extract_tags(self): a = set() for r in self.ruleChains: diff --git a/tools/kothic/mapcss/__init__.py b/tools/kothic/mapcss/__init__.py index a78519ffbb..a7aea62ef5 100644 --- a/tools/kothic/mapcss/__init__.py +++ b/tools/kothic/mapcss/__init__.py @@ -177,15 +177,6 @@ class MapCSS(): d[x.get('object-id', '')].update(x) return d - def get_interesting_tags(self, type=None, zoom=None): - """ - Get set of interesting tags. - """ - tags = set() - for chooser in self.choosers: - tags.update(chooser.get_interesting_tags(type, zoom)) - return tags - def subst_variables(self, t): """Expects an array from parseDeclaration.""" for k in t[0]: |