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

Remove GeoMultiPolygon since it is not used #647

Closed
wants to merge 1 commit into from

Conversation

ajfriend
Copy link
Contributor

@ajfriend ajfriend commented Aug 21, 2022

Or is there a reason to keep this in h3api.h?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.92% when pulling 8fad017 on ajfriend:geomulti2 into 3f92cb8 on uber:master.

@ajfriend
Copy link
Contributor Author

ajfriend commented Aug 21, 2022

Alternatively, we could get rid of all the LinkedMultiPolygon functions/structs (really, just not expose them in the public API), and just expose the arguably cleaner GeoMultiPolygon struct and associated functions publicly.

We would just need to write an (internal) function to convert from LinkedGeoPolygon to GeoMultiPolygon, and provide a public destroyGeoMultiPolygon() function.

@isaacbrodsky
Copy link
Collaborator

Can this be merged after v4.0.0 is released?

@ajfriend
Copy link
Contributor Author

Can this be merged after v4.0.0 is released?

I think it depends on what we think the ideal end state would be (the public-facing data structure as LinkedMultiPolygon or GeoMultiPolygon), and if/when we'd want to remove the other "deprecated" functions.

Apologies for coming up with another issue before 4.0, but I didn't see this stuff until I started using the new API in the Python bindings. I mostly wanted to flag this for discussion. I think here are benefits here, but I'm not sure if they outweigh the cost of delaying...

And correct me if I'm wrong, but I think using GeoMultiPolygon would greatly simplify the implementations in the bindings.
I'm guessing each of the bindings essentially implements their own linked list walker to do LinkedMultiPolygon_to_GeoMultiPolygon. We could move all of that common code to the C bindings, and I'm guessing that function shouldn't be too hard to (re)write in C.

Also, we can reduce the API surface area by removing the Linked* data structures, which I think could be confusing to users. The Linked* stuff feels like it should be hidden as an implementation detail.

@ajfriend
Copy link
Contributor Author

And I'm guessing that was the intention behind GeoMultiPolygon, but we just never got to completing that work.

@ajfriend
Copy link
Contributor Author

Oh, but maybe there's a potential speed benefit in avoiding the translation to non-linked data structures, so maybe it makes sense to keep both interfaces?

@isaacbrodsky
Copy link
Collaborator

We discussed offline; I understand we will not block v4.0.0 on this change. We might just use this structure soon after releasing v4, or we'll consider removing it after the v4 release as no function is consuming/using/producing this structure.

@nrabinowitz @ajfriend

@isaacbrodsky
Copy link
Collaborator

#681

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.

3 participants