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

Type of coordinates for Polygon should be list of list of tuples #162

Open
stefano-xy opened this issue May 12, 2021 · 0 comments
Open

Type of coordinates for Polygon should be list of list of tuples #162

stefano-xy opened this issue May 12, 2021 · 0 comments

Comments

@stefano-xy
Copy link

stefano-xy commented May 12, 2021

PyCharm complains that:

Polygon([[(2.38, 57.322), (23.194, -20.28), (-120.43, 19.15), (2.38, 57.322)], [(-5.21, 23.51), (15.21, -10.81), (-20.51, 1.51), (-5.21, 23.51)]])

is invalid because it believes the __init__ method of Polygon expects either a tuple, or a list of tuples. I can't spot any type annotation in the project and I don't know where it reads this hint, if not from the docstring.

If this is the case, we should make clear that list of list of tuple is needed for Polygon and I think also MultiLineString.

I'd introduce separate __init__ in each class, that would be helpful for final users. Adding type annotation to function parameters and return values would also help.

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

No branches or pull requests

1 participant