-
Notifications
You must be signed in to change notification settings - Fork 48
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
[DOCS] Fix geometry object creation #484
Conversation
Codecov ReportPatch and project coverage have no change.
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #484 +/- ##
=======================================
Coverage 87.27% 87.27%
=======================================
Files 11 11
Lines 833 833
=======================================
Hits 727 727
Misses 106 106 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a TypeError
when executing this locally:
TypeError Traceback (most recent call last)
Cell In[12], line 2
1 import pygeoif
----> 2 aoi_as_pygeoif_polygon = pygeoif.geometry.Polygon(aoi_as_dict["coordinates"])
4 search = client.search(
5 max_items = 25,
6 collections = "aster-l1t",
7 intersects = aoi_as_pygeoif_polygon,
8 )
10 print(f"AOI as pygeoif Polygon, found {len(list(search.items()))} items")
File [~/Code/stac-utils/pystac-client/.venv/lib/python3.11/site-packages/pygeoif/geometry.py:535](https://file+.vscode-resource.vscode-cdn.net/Users/gadomski/Code/stac-utils/pystac-client/docs/tutorials/~/Code/stac-utils/pystac-client/.venv/lib/python3.11/site-packages/pygeoif/geometry.py:535), in Polygon.__init__(self, shell, holes)
533 if holes:
534 self._interiors = tuple(LinearRing(hole) for hole in holes)
--> 535 self._exterior = LinearRing(shell)
File [~/Code/stac-utils/pystac-client/.venv/lib/python3.11/site-packages/pygeoif/geometry.py:449](https://file+.vscode-resource.vscode-cdn.net/Users/gadomski/Code/stac-utils/pystac-client/docs/tutorials/~/Code/stac-utils/pystac-client/.venv/lib/python3.11/site-packages/pygeoif/geometry.py:449), in LinearRing.__init__(self, coordinates)
441 def __init__(self, coordinates: LineType) -> None:
442 """
443 Initialize a LinearRing.
444
(...)
447 A sequence of (x, y [,z]) numeric coordinate pairs or triples
448 """
...
--> 412 point = Point(*coord)
413 if not point.is_empty:
414 geoms.append(point)
TypeError: Point.__init__() takes from 3 to 4 positional arguments but 6 were given
I've opened #488 to capture the need to execute our notebooks in CI to ensure they don't bitrot.
Isn't that the line I changed to Because that error that you reported is exactly what I was trying to fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦🏼 yeah I must have checked out the wrong branch, my bad.
Description:
I was running through the docs for #480 and noticed that this one had a minor issue.
PR Checklist: