diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-08-11 12:05:22 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:00:39 +0300 |
commit | 3843c26c03e8137e631099f76e09b25a29d0f57a (patch) | |
tree | 161e2093316eb430f191a34f14fe3ea1a708da77 /tools | |
parent | 08a3edb8a726f5f05d3f1d4322ca1f12ec41db38 (diff) |
Removed unused function get_mapnik_filter
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kothic/mapcss/Condition.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/kothic/mapcss/Condition.py b/tools/kothic/mapcss/Condition.py index a476eb9379..e455f7cdff 100644 --- a/tools/kothic/mapcss/Condition.py +++ b/tools/kothic/mapcss/Condition.py @@ -216,41 +216,6 @@ class Condition: except KeyError: pass - def get_mapnik_filter(self): - # params = [re.escape(x) for x in self.params] - params = self.params - t = self.type - if t == 'eq': # don't compare tags against sublayers - if params[0][:2] == "::": - return '' - try: - if t == 'eq': - return '[%s] = \'%s\'' % (params[0], params[1]) - if t == 'ne': - return 'not([%s] = \'%s\')' % (params[0], params[1]) - if t == 'regex': - return '[%s].match(\'%s\')' % (params[0], params[1].replace("'", "\\'")) - if t == 'true': - return '[%s] = \'yes\'' % (params[0]) - if t == 'untrue': - return '[%s] = \'no\'' % (params[0]) - if t == 'set': - return '[%s] != \'\'' % (params[0]) - if t == 'unset': - return 'not([%s] != \'\')' % (params[0]) - - if t == '<': - return '[%s__num] < %s' % (params[0], float(params[1])) - if t == '<=': - return '[%s__num] <= %s' % (params[0], float(params[1])) - if t == '>': - return '[%s__num] > %s' % (params[0], float(params[1])) - if t == '>=': - return '[%s__num] >= %s' % (params[0], float(params[1])) - # return "" - except KeyError: - pass - def __repr__(self): return "%s %s " % (self.type, repr(self.params)) |