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

Proposal: allow Polygon to be constructed from a vector of PointTrait geometries #168

Open
asinghvi17 opened this issue Sep 26, 2024 · 4 comments

Comments

@asinghvi17
Copy link
Member

That would allow a much cleaner syntax than the current Polygon([LinearRing(...)])...

@asinghvi17 asinghvi17 changed the title [FR] allow Polygon to be constructed from a vector of PointTraits [FR] allow Polygon to be constructed from a vector of PointTrait geometries Sep 26, 2024
@asinghvi17 asinghvi17 changed the title [FR] allow Polygon to be constructed from a vector of PointTrait geometries Proposal: allow Polygon to be constructed from a vector of PointTrait geometries Sep 26, 2024
@rafaqz
Copy link
Member

rafaqz commented Sep 26, 2024

Just syntax? Or you want it to actually wrap that?

We could do like the last PR and auto wrap it in a vector of LinearRing and call Polygon again.

@asinghvi17
Copy link
Member Author

asinghvi17 commented Sep 26, 2024

Yeah, the wrapping approach is what I was thinking.

@evetion
Copy link
Member

evetion commented Sep 27, 2024

You'll run into issues like having to check the points form a ring, otherwise they're not a valid polygon.

@rafaqz
Copy link
Member

rafaqz commented Sep 27, 2024

I think LinearRing doesn't check validity either ?

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

3 participants