Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e45b00b

Browse files
committed
petljarenje...
1 parent e7960e1 commit e45b00b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

srtm/data.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,18 @@ def get_neighbour_points(self, latitude, longitude):
237237

238238
row, column = self.get_row_and_column(latitude, longitude)
239239

240-
point_1 = self.latitude + 1 - row * d , self.longitude + column * d
241-
point_2 = self.latitude + 1 - (row + 1) * d, self.longitude + column * d
242-
point_3 = self.latitude + 1 - row * d , self.longitude + (column + 1) * d
243-
point_4 = self.latitude + 1 - (row + 1) * d, self.longitude + (column + 1) * d
240+
left = self.longitude + column * d
241+
right = self.longitude + (column + 1) * d
242+
bottom = self.latitude + 1 - (row + 1) * d
243+
top = self.latitude + 1 - row * d
244244

245-
assert latitude <= point_1[0] and point_1[1] <= longitude
246-
assert point_2[0] <= latitude and point_2[1] <= longitude
247-
assert latitude <= point_3[0] and longitude <= point_3[1]
248-
assert point_2[0] <= latitude and longitude <= point_4[1]
245+
pdb.set_trace()
246+
assert left <= longitude
247+
assert longitude <= right
248+
assert bottom <= latitude
249+
assert latitude <= top
249250

250-
return point_1, point_2, point_3, point_4
251+
return left, right, top, bottom
251252

252253
def get_elevation(self, latitude, longitude, approximate=None):
253254
"""
@@ -262,7 +263,6 @@ def get_elevation(self, latitude, longitude, approximate=None):
262263
points = self.square_side ** 2
263264

264265
row, column = self.get_row_and_column(latitude, longitude)
265-
print row, column
266266

267267
if approximate:
268268
return self.approximation(latitude, longitude)

0 commit comments

Comments
 (0)