Skip to content

Commit

Permalink
Corrected map_pixel
Browse files Browse the repository at this point in the history
Corrects map_pixel, while making union and align work correctly
  • Loading branch information
ozak committed May 28, 2020
1 parent 90c443b commit c5416d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions georasters/georasters.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def map_pixel(point_x, point_y, cellx, celly, xmin, ymax):
'''
point_x = np.asarray(point_x)
point_y = np.asarray(point_y)
col = np.floor((point_x - xmin) / cellx).astype(int)
row = np.floor((point_y - ymax) / celly).astype(int)
col = np.round((point_x - xmin) / cellx).astype(int)
row = np.round((point_y - ymax) / celly).astype(int)
return row, col

def map_pixel_inv(row, col, cellx, celly, xmin, ymax):
Expand Down

0 comments on commit c5416d8

Please sign in to comment.