From fac258b46b8922fe95733ac84b0693c09d29e2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Thu, 16 Nov 2017 23:14:36 +0100 Subject: [PATCH] removing borders makes no sence at all, ever, and should not be done --- src/c3nav/mapdata/cache.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/c3nav/mapdata/cache.py b/src/c3nav/mapdata/cache.py index f8a1619e..eea4a0ee 100644 --- a/src/c3nav/mapdata/cache.py +++ b/src/c3nav/mapdata/cache.py @@ -185,24 +185,6 @@ class MapHistory: for i, affected in enumerate(new_affected): self.data[affected] = i - # remove borders - rows = self.data.any(axis=1).nonzero()[0] - logging.info('rows: %s' % rows) - if not rows.size: - logging.info('no rows, empty_array') - self.data = self.empty_array - self.x = 0 - self.y = 0 - return - cols = self.data.any(axis=0).nonzero()[0] - logging.info('cols: %s' % cols) - miny, maxy = rows.min(), rows.max() - minx, maxx = cols.min(), cols.max() - logging.info('minx=%d, miny=%d, maxx=%d, maxy=%d' % (minx, miny, maxx, maxy)) - self.x += minx - self.y += miny - self.data = self.data[miny:maxy+1, minx:maxx+1] - def composite(self, other, mask_geometry): if other.resolution != other.resolution: return