Open zthab opened 3 years ago
Hi @zthab , Thanks for your fix. However, in the given example by creators they specifically extracting residency, lotno manually. but if we want to extract all the columns in the table, do we still need to find the coordinates from start columns to end column manually using other tools?. I am really having challenges to convert this table GXMH31H.pdf to dataframe
Describe the bug In the example given here the function group_blocks_by_distance doesn't sort within row in the x direction. I came up with a simple fix to this as implemented below, and thought I would flag it for anyone else who runs into this issue.
To Reproduce Steps to reproduce the behavior:
What command or script did you run?
left to right if x_direction = 0, right to left if x_direction = 1
def group_blocks_by_distance(blocks, distance_th, x_direction): blocks = sorted(blocks, key = lambda x: (x.coordinates[1])) distances = np.array([b2.coordinates[1] - b1.coordinates[3] for (b1, b2) in zip(blocks, blocks[1:])])