Bug fixes
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
5bd5d9da92
commit
83ca0c66c7
1 changed files with 7 additions and 7 deletions
14
common.py
14
common.py
|
@ -73,20 +73,20 @@ def get_area_name(s, w, major=False):
|
||||||
|
|
||||||
if s % 10 != 0:
|
if s % 10 != 0:
|
||||||
s = s - (s % 10)
|
s = s - (s % 10)
|
||||||
return ew + norm(abs(w), 3) + ns + norm(abs(s), 2)
|
return ew + norm(abs(math.floor(w)), 3) + ns + norm(abs(math.floor(s)), 2)
|
||||||
|
|
||||||
# Returns latitude of tiles SW corner in area scheme
|
# Returns latitude of tiles SW corner in area scheme
|
||||||
def get_lat(tile):
|
def get_lat(tile):
|
||||||
return ((16320 & tile) >> 6) - 90
|
return ((16320 & int(tile)) >> 6) - 90
|
||||||
|
|
||||||
# Returns longditude of tiles SW corner in area scheme
|
# Returns longditude of tiles SW corner in area scheme
|
||||||
def get_lon(tile):
|
def get_lon(tile):
|
||||||
return ((16760832 & tile) >> 14) - 180
|
return ((16760832 & int(tile)) >> 14) - 180
|
||||||
|
|
||||||
# Returns precise west boundary of tile
|
# Returns precise west boundary of tile
|
||||||
def get_west(tile):
|
def get_west(tile):
|
||||||
lon = ((16760832 & tile) >> 14) - 180
|
lon = ((16760832 & int(tile)) >> 14) - 180
|
||||||
y = (7 & tile) / (1 / get_tile_width(get_lat(tile)))
|
y = (7 & int(tile)) / (1 / get_tile_width(get_lat(tile)))
|
||||||
return lon + y
|
return lon + y
|
||||||
|
|
||||||
# Returns east boundary of tile
|
# Returns east boundary of tile
|
||||||
|
@ -95,8 +95,8 @@ def get_east(tile):
|
||||||
|
|
||||||
# Returns precise south boundary of tile
|
# Returns precise south boundary of tile
|
||||||
def get_south(tile):
|
def get_south(tile):
|
||||||
lat = ((16320 & tile) >> 6) - 90
|
lat = ((16320 & int(tile)) >> 6) - 90
|
||||||
x = ((56 & tile) >> 3) / 8
|
x = ((56 & int(tile)) >> 3) / 8
|
||||||
return lat + x
|
return lat + x
|
||||||
|
|
||||||
# Returns north boundary of tile
|
# Returns north boundary of tile
|
||||||
|
|
Loading…
Reference in a new issue