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

CellUnionFromIntersection calls Normalize() #111

Open
missinglink opened this issue Nov 19, 2024 · 1 comment
Open

CellUnionFromIntersection calls Normalize() #111

missinglink opened this issue Nov 19, 2024 · 1 comment

Comments

@missinglink
Copy link

Both the CPP and Go versions of CellUnionFromIntersection state that the intersection algo produces a result that is in sorted order.

The go code calls cu.Normalize() anyway, what is the purpose of this?

geo/s2/cellunion.go

Lines 107 to 108 in 6adc566

// The output is generated in sorted order.
cu.Normalize()

The CPP code doesn't call normalize:

https://github.com/google/s2geometry/blob/0fb1b8a1474f3137c8b44a7861e31f8efd1370e2/src/s2/s2cell_union.cc#L376

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