Skip to content

Commit

Permalink
Hotfix for issue #1 avoiding going out of range of raster
Browse files Browse the repository at this point in the history
  • Loading branch information
kogens committed Sep 9, 2021
1 parent b319010 commit 811f0a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdal2kml.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def create_kml(source, filename, directory, tile_size=1024, border=0, name=None,

tile_layout = tiles(cropped_size, tile_size)

tile_sizes = [int(math.ceil(x)) for x in [cropped_size[0] / tile_layout[0], cropped_size[1] / tile_layout[1]]]
tile_sizes = [int(math.floor(x)) for x in [cropped_size[0] / tile_layout[0], cropped_size[1] / tile_layout[1]]]
logging.debug('Using tile layout %s -> %s' % (tile_layout, tile_sizes))

bob = open(filename, 'w')
Expand Down

0 comments on commit 811f0a7

Please sign in to comment.