|
14 | 14 | except ImportError:
|
15 | 15 | HAS_CAIRO = False
|
16 | 16 |
|
17 |
| -VERSION = '1.5.2' |
| 17 | +VERSION = '1.6' |
18 | 18 | TILE_BUFFER = 128
|
19 | 19 | IM_MONTAGE = 'montage'
|
20 | 20 |
|
@@ -376,12 +376,12 @@ def add_fonts(path):
|
376 | 376 | select_layers(m, options.add_layers.split(',') if options.add_layers else [], options.hide_layers.split(',') if options.hide_layers else [])
|
377 | 377 |
|
378 | 378 | if options.debug:
|
379 |
| - print 'scale={}'.format(scale) |
380 |
| - print 'scale_factor={}'.format(scale_factor) |
381 |
| - print 'size={},{}'.format(size[0], size[1]) |
382 |
| - print 'bbox={}'.format(bbox) |
383 |
| - print 'bbox_wgs84={}'.format(transform.backward(bbox) if bbox else None) |
384 |
| - print 'layers=' + ','.join([l.name for l in m.layers if l.active]) |
| 379 | + print('scale={}'.format(scale)) |
| 380 | + print('scale_factor={}'.format(scale_factor)) |
| 381 | + print('size={},{}'.format(size[0], size[1])) |
| 382 | + print('bbox={}'.format(bbox)) |
| 383 | + print('bbox_wgs84={}'.format(transform.backward(bbox) if bbox else None)) |
| 384 | + print('layers=' + ','.join([l.name for l in m.layers if l.active])) |
385 | 385 |
|
386 | 386 | # generate metadata
|
387 | 387 | if options.ozi:
|
@@ -424,14 +424,14 @@ def add_fonts(path):
|
424 | 424 | m.buffer_size = TILE_BUFFER
|
425 | 425 | tile_cnt = [int(math.ceil(1.0 * size[0] / width)), int(math.ceil(1.0 * size[1] / height))]
|
426 | 426 | if options.debug:
|
427 |
| - print 'tile_count={},{}'.format(tile_cnt[0], tile_cnt[1]) |
428 |
| - print 'tile_size={},{}'.format(width, height) |
| 427 | + print('tile_count={},{}'.format(tile_cnt[0], tile_cnt[1])) |
| 428 | + print('tile_size={},{}'.format(width, height)) |
429 | 429 | tmp_tile = '{:02d}_{:02d}_{}'
|
430 | 430 | tile_files = []
|
431 | 431 | for row in range(0, tile_cnt[1]):
|
432 | 432 | for column in range(0, tile_cnt[0]):
|
433 | 433 | if options.debug:
|
434 |
| - print 'tile={},{}'.format(row, column) |
| 434 | + print('tile={},{}'.format(row, column)) |
435 | 435 | tile_bbox = mapnik.Box2d(bbox.minx + 1.0 * width * scale * column, bbox.maxy - 1.0 * height * scale * row, bbox.minx + 1.0 * width * scale * (column + 1), bbox.maxy - 1.0 * height * scale * (row + 1))
|
436 | 436 | tile_size = [width if column < tile_cnt[0] - 1 else size[0] - width * (tile_cnt[0] - 1), height if row < tile_cnt[1] - 1 else size[1] - height * (tile_cnt[1] - 1)]
|
437 | 437 | m.zoom_to_box(tile_bbox)
|
@@ -465,5 +465,5 @@ def add_fonts(path):
|
465 | 465 | msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
|
466 | 466 |
|
467 | 467 | outfile.seek(0)
|
468 |
| - print outfile.read() |
| 468 | + print(outfile.read()) |
469 | 469 | outfile.close()
|
0 commit comments