Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Place block. #116

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Fix Place block. #116

merged 4 commits into from
Jan 12, 2024

Conversation

arjanverkerk
Copy link
Contributor

When fixing a transform performance issue, a swap of xmax and ymin was inadvertently introduced (difference between ogrs "Envelope" and the bbox the rest of the world uses). This had some consequences:

  • The "warp" path may not always have been walked (e.g. trees near Amersfoort seemed to have a gigantic extent and fully retrieving would almost never be considered)
  • When the warp path was walked (trees near 0, 0), it could lead to wrong width & height for the request to the source (even negative values). This eventually led to a ZeroDivisionError and the discovery of this problem.

Copy link
Collaborator

@caspervdw caspervdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find! A bug as clear as it can be.

One comment about something apparently unrelated.

And maybe you can fix the warning in the github actions check

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

@@ -753,7 +753,7 @@ def choices(self):

@staticmethod
def process(source, *choices):
result = pd.Series(np.nan, index=source.index)
result = pd.Series(np.nan, dtype=object, index=source.index)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you touch this?

I guess it originally was float; reading the docstring I think this geoblock is also intended for numbers. Changing it to object will allow any type, also strings, is that what something you intend to fix? For floats and ints this will be a suboptimal efficiency...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '['A']' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.

I used this solution from the other open PR, it solves the warning and I didn't dive into it further.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the rtd action somehow, but I don't know where to find the warning that you mention. I will merge for now and then we move on.

@arjanverkerk arjanverkerk merged commit 94a8303 into master Jan 12, 2024
13 checks passed
@arjanverkerk arjanverkerk deleted the verkerk-fix-place branch January 12, 2024 09:21
@arjanverkerk
Copy link
Contributor Author

@caspervdw Care to make a release now this is merged?

@caspervdw
Copy link
Collaborator

Thanks for the reminder, it's done now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants