From 68c3a9f688fc41c00efb48131e72e82771d2d8ea Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Wed, 21 Jun 2017 15:25:31 -0300 Subject: [PATCH 1/2] Bypass "too far from file corner" error. --- tilecache/TileCache/Layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tilecache/TileCache/Layer.py b/tilecache/TileCache/Layer.py index 2168fb6..88e1665 100644 --- a/tilecache/TileCache/Layer.py +++ b/tilecache/TileCache/Layer.py @@ -478,7 +478,7 @@ def getLevel (self, res, size = [256, 256]): ## (3, 1, 2) ############################################################################ - def getCell (self, (minx, miny, maxx, maxy), exact = True): + def getCell (self, (minx, miny, maxx, maxy), exact = False): """ Returns x, y, z From 45f9c74376f6fccf65357e6a86cd1928dc80bab5 Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Thu, 22 Jun 2017 15:22:10 -0300 Subject: [PATCH 2/2] Fix error: "range() integer end argument expected, got float." when executing tilecache_seed.py. --- tilecache/TileCache/Layer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tilecache/TileCache/Layer.py b/tilecache/TileCache/Layer.py index 88e1665..e919803 100644 --- a/tilecache/TileCache/Layer.py +++ b/tilecache/TileCache/Layer.py @@ -510,8 +510,8 @@ def getCell (self, (minx, miny, maxx, maxy), exact = False): x0 = (minx - self.bbox[0]) / (res * self.size[0]) y0 = (miny - self.bbox[1]) / (res * self.size[1]) - x = round(x0) - y = round(y0) + x = int(round(x0)) + y = int(round(y0)) tilex = ((x * res * self.size[0]) + self.bbox[0]) tiley = ((y * res * self.size[1]) + self.bbox[1])