Closed noahgolmant closed 8 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
It seems like this approach might not always work as expected.
Threads
operate independently and might produce output at different times
. For our requirement, maintaining the order of output is crucial, but the solution you wrote above is not capturing the index or order of the output.. Therefore, I'm concerned that this method might not deliver the expected output every time.
Also do you mind if I make use arr.flatten()
in my #121, this seems better than what we are currently using tiles[i] = arr.tolist() if coordinate_type == 'x' else arr.tolist()[0]
?
Thanks.
I see what you mean. Could we just sort the values before returning? Since lat/lon must be ordered. Or just modify the existing code to use tiles[i]
without the other per band logic you introduced?
Not really sure if we should sort the data as sorting will take time so it will increasing over-all opening time and regarding the second-part in the existing code i
of tiles[i]
is slice object
and it gives error in the example of this #118 and #121 is updating that i
to normal index
and resolve that error.
I'm taking reference of your PR & incorporating tiles[i] = arr.flatten()
in #121. Hope you don't mind. Thanks.
Sounds good, closing this PR!
In some cases,
lat
andlon
would have different return shapes fromget_tile_from_ee
. This resulted in an error duringnp.concatenate
like:This fixes the concatenation logic to just store a flattened array of coordinates. I think this should also resolve the same issue as #121, but I think it's slightly more robust since it supports all possible return shapes.
(I just went ahead and signed the CLA after putting this up for draft btw)