this PR should speed up the GeoTiff.get_coord_arrays method by several orders of magnitude for any larger array.
The previous implementation spent a lot of time, calling TifTransformer.get_xy for every grid node seperately. Solved by adding a method TifTransformer.get_xy_array to do the transform for all requested nodes in a single shot and letting numpy do the looping.
Sorry, I couldn't run pre-commit locally because it fails when setting up the various dependencies with pip. I cannot investigate the reason due to time constraints.
The proposed changes break some internal interfaces (_convert_coords_array now takes arrays instead of lists), therefore I label this as WIP. Please check if this is a problem.
Hi,
this PR should speed up the
GeoTiff.get_coord_arrays
method by several orders of magnitude for any larger array.The previous implementation spent a lot of time, calling
TifTransformer.get_xy
for every grid node seperately. Solved by adding a methodTifTransformer.get_xy_array
to do the transform for all requested nodes in a single shot and letting numpy do the looping.Sorry, I couldn't run pre-commit locally because it fails when setting up the various dependencies with pip. I cannot investigate the reason due to time constraints.
The proposed changes break some internal interfaces (
_convert_coords_array
now takes arrays instead of lists), therefore I label this as WIP. Please check if this is a problem.Best wishes Sebastian