Skip to content

Commit

Permalink
Allow integer input to srtm1_tiles_names.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Mar 30, 2016
1 parent 3ffc45d commit 5c9bbdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elevation/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def srtm1_tiles_names(left, bottom, right, top, tile_name_template='{slat}{slon}
ileft, itop = srtm1_tile_ilonlat(left, top)
iright, ibottom = srtm1_tile_ilonlat(right, bottom)
# special case often used *integer* top and right to avoid downloading unneeded tiles
if top.is_integer():
if isinstance(top, int) or top.is_integer():
itop -= 1
if right.is_integer():
if isinstance(right, int) or right.is_integer():
iright -= 1
for ilon in range(ileft, iright + 1):
slon = '%s%03d' % ('E' if ilon >= 0 else 'W', abs(ilon))
Expand Down

0 comments on commit 5c9bbdb

Please sign in to comment.