Skip to content

Commit

Permalink
grass.pygrass: restore removed function and mark it as deprecated (#2859
Browse files Browse the repository at this point in the history
)
  • Loading branch information
petrasovaa committed May 11, 2023
1 parent f88d42c commit ebe725c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions python/grass/pygrass/modules/grid/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@
from grass.pygrass.modules import Module


def get_start_end_index(bbox_list):
"""Convert a Bounding Box to a list of the index of
column start, end, row start and end
:param bbox_list: a list of BBox object to convert
:type bbox_list: list of BBox object
.. deprecated:: 8.3
"""
ss_list = []
reg = Region()
for bbox in bbox_list:
r_start, c_start = coor2pixel((bbox.west, bbox.north), reg)
r_end, c_end = coor2pixel((bbox.east, bbox.south), reg)
ss_list.append((int(r_start), int(r_end), int(c_start), int(c_end)))
return ss_list


def rpatch_row(rast, rasts, bboxes):
"""Patch a row of bound boxes.
Expand Down

0 comments on commit ebe725c

Please sign in to comment.