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

use shapely >=1.8 #71

Merged
merged 2 commits into from
Mar 21, 2023
Merged

use shapely >=1.8 #71

merged 2 commits into from
Mar 21, 2023

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Mar 13, 2023

Follow up from #70 (comment)

@ocefpaf ocefpaf marked this pull request as draft March 13, 2023 13:12
@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 13, 2023

One test is failing with:

E             Full diff:
E               {
E                'attributes': {'geospatial_bbox': 'POLYGON ((198.669 61.777, 198.669 67.068, '
E             +                                    '174.79200000000003 67.068, '
E             -                                    '174.792 67.068, 174.792 61.777, 198.669 '
E             ?                                            ---- ^^^^^^^^^^^
E             +                                    '174.79200000000003 61.777, 198.669 '
E             ?                                             ^^^^^^^^^^
E                                                  '61.777))',
E             -                 'geospatial_bounds': 'POLYGON ((174.792 61.777, 174.926 '
E             ?                                                                 --------
E             +                 'geospatial_bounds': 'POLYGON ((174.79200000000003 61.777, '
E             ?                                                        +++++++++++
E             +                                      '174.92599999999993 62.206, 178.812 '
E             -                                      '62.206, 178.838667737 64.055605136, '
E             -                                      '178.916 64.084, 179.858 64.311, 192.86 '
E             -                                      '67.029, 196.86 67.068, 198.669 66.861, '
E             ?                                                              ----------------
E             +                                      '64.098, 192.86 67.029, 196.86 67.068, '
E             ?                                       +++++++++++++++
E             -                                      '187.753767857 64.334204193, 179.195 '
E             +                                      '197.094 67.044, 198.669 66.861, 187.784 '
E             +                                      '64.188, 179.10799999999995 62.266, '
E             +                                      '176.16899999999998 61.862, '
E             -                                      '62.395, 176.169 61.862, 174.792 61.777))',
E             ?                                       ------------------------
E             +                                      '174.79200000000003 61.777))',
E             ?                                              +++++++++++

Some are just floating points diffs like 174.79200000000003 vs 174.792 in the bbox. But in the bounds we have some that may be a mistake, like 178.838667737 64.055605136, 178.916 vs 178.812 64.098, 192.86.

@kwilcox
Copy link
Member

kwilcox commented Mar 13, 2023

I'm not surprised by the diff, it's now using different methods to "fix" the dateline crossing. I'll plot them both and make sure its still a valid "fix"...

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 21, 2023

I'll plot them both and make sure its still a valid "fix"...

@kwilcox I know you are busy and hopefully this notebook will help you out to make a call here:

https://nbviewer.org/urls/gist.githubusercontent.com/ocefpaf/e6afad88f3063279ddcc21efa2847b89/raw/1b66d04b6381abb622e9e98e3b177b4838a99bbb/gistfile1.txt

If you are OK with the new polygons I can adjust the tests.


edit: I sent the commit with the value changes. We can revert if you disagree with the comparison in the notebook.

@ocefpaf ocefpaf marked this pull request as ready for review March 21, 2023 18:28
@ocefpaf ocefpaf mentioned this pull request Mar 21, 2023
@kwilcox kwilcox merged commit a902d54 into pyoceans:main Mar 21, 2023
@ocefpaf ocefpaf deleted the use_shapely_ge_1.8 branch March 21, 2023 19:11
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