[GRASS-SVN] r58782 - grass/trunk/scripts/r.tileset
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jan 26 02:27:19 PST 2014
Author: neteler
Date: 2014-01-26 02:27:19 -0800 (Sun, 26 Jan 2014)
New Revision: 58782
Modified:
grass/trunk/scripts/r.tileset/r.tileset.py
Log:
r.tileset: declaration fixes provided by sbl (trac #1825)
Modified: grass/trunk/scripts/r.tileset/r.tileset.py
===================================================================
--- grass/trunk/scripts/r.tileset/r.tileset.py 2014-01-25 23:43:30 UTC (rev 58781)
+++ grass/trunk/scripts/r.tileset/r.tileset.py 2014-01-26 10:27:19 UTC (rev 58782)
@@ -208,10 +208,10 @@
bi_b2 = (bbox_2['e'], bbox_2['n'])
cin = [False, False]
for i in (0, 1):
- if (bi_a1[i] <= bi_b1[i] and bi_a2[i] >= bi_b2[i]) or \
+ if (bi_a1[i] <= bi_b1[i] and bi_a2[i] >= bi_b1[i]) or \
(bi_a1[i] <= bi_b1[i] and bi_a2[i] >= bi_b2[i]) or \
- (bi_a1[i] <= bi_b1[i] and bi_a1[i] >= bi_b2[i]) or \
- (bi_a2[i] <= bi_b1[i] and bi_a2[i] >= bi_b2[i]):
+ (bi_b1[i] <= bi_a1[i] and bi_b2[i] >= bi_a1[i]) or \
+ (bi_b1[i] <= bi_a1[i] and bi_b2[i] >= bi_a2[i]):
cin[i] = True
if cin[0] and cin[1]:
@@ -351,12 +351,12 @@
xi = 0
tile_bbox = { 'w' : -1, 's': -1, 'e' : -1, 'n' : -1 }
while xi < ximax:
- tile_bbox['w'] = min_x + (xi * tile_size[0] / tileset_size[0]) * span_x
- tile_bbox['e'] = min_x + ((xi + 1) * tile_size_overlap[0] / tileset_size[0]) * span_x
+ tile_bbox['w'] = float(min_x) + (float(xi) * float(tile_size[0]) / float(tileset_size[0])) * float(span_x)
+ tile_bbox['e'] = float(min_x) + (float(xi + 1) * float(tile_size_overlap[0]) / float(tileset_size[0])) * float(span_x)
yi = 0
while yi < yimax:
- tile_bbox['s'] = min_y + (yi * tile_size[1] / tileset_size[1]) * span_y
- tile_bbox['n'] = min_y + ((yi + 1) * tile_size_overlap[1] / tileset_size[1]) * span_y
+ tile_bbox['s'] = float(min_y) + (float(yi) * float(tile_size[1]) / float(tileset_size[1])) * float(span_y)
+ tile_bbox['n'] = float(min_y) + (float(yi + 1) * float(tile_size_overlap[1]) / float(tileset_size[1])) * float(span_y)
tile_bbox_points = bboxToPoints(tile_bbox)
tile_dest_bbox_points = projectPoints(tile_bbox_points,
source = srs_source,
More information about the grass-commit
mailing list