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

Add num_rings or rings_count to Polygon #706

Closed
frewsxcv opened this issue Dec 30, 2021 · 4 comments
Closed

Add num_rings or rings_count to Polygon #706

frewsxcv opened this issue Dec 30, 2021 · 4 comments

Comments

@frewsxcv
Copy link
Member

frewsxcv commented Dec 30, 2021

No description provided.

@edpft
Copy link

edpft commented Feb 13, 2022

Is this just 1 + length of interiors vector or am I missing something?

@callpraths
Copy link
Contributor

callpraths commented Mar 2, 2022

Thanks for adding starter bugs for the likes of me :)
Is there interest in adding this?

A few clarifications would be useful:

  1. Naming: I'd vote for rings_count to go with existing coords_count (PostGIS uses ST_NRings, geos crate has get_num_interior_rings and nothing that includes the exterior ring).
  2. Should this be added directly to struct impl(s)?
  3. It should probably be added to: Polygon, MultiPolygon, Rect (always 1) and Triangle (always 1).

@callpraths
Copy link
Contributor

callpraths commented Mar 2, 2022

I want to answer 2 with: Add geo::algorithm::RingsCount trait, even though it will only be implemented for a few of the core types. There are plenty of examples where algorithms only apply to subset of types (e.g. FrechetDistance only applies to LineString).

@frewsxcv
Copy link
Member Author

frewsxcv commented Apr 3, 2024

Resolved in #1145

@frewsxcv frewsxcv closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants