geo icon indicating copy to clipboard operation
geo copied to clipboard

`CellUnionFromIntersection` calls `Normalize()`

Open missinglink opened this issue 1 year ago • 2 comments

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?

https://github.com/golang/geo/blob/6adc5660321723185f04b66d66a5563b29228236/s2/cellunion.go#L107-L108

The CPP code doesn't call normalize:

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

missinglink avatar Nov 19 '24 12:11 missinglink

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

missinglink avatar Nov 19 '24 12:11 missinglink

@rsned

jmr avatar Apr 01 '25 07:04 jmr